user3806126 user3806126 - 1 year ago 36
MySQL Question

MySQL select table

How can I select a MySQL table when the table name is in the URL format?

SELECT hash FROM '' WHERE time = '1465132682'

This will output following error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' WHERE time = '1465132682'' at line 1

Xen Xen

Are you sure that's a table name?

Anyway assuming it is, you should be able to use backticks to quote the table name.

SELECT hash FROM `` WHERE time = '1465132682'