user3806126 user3806126 - 1 year ago 62
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
Answer Source

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'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download