I have an Access 2003 db with a huge number of tables with weird names. I need to read tables' records using a PHP script and ODBC.
Some tables' names have double quotes inside them like this:
Weird """""" Table_Name
ODBC connection works fine, select using an "ordinary" file names works fine. While using odbc_exec($dbh, 'SELECT * FROM [Weird """""" Table_Name]')
it gives:
Warning: odbc_exec(): SQL error: [Microsoft][Driver ODBC Microsoft Access] Parentesi non valide nel nome 'Weird ['., SQL state 37000 in SQLExecDirect in ...(php file).
I understand that the ODBC driver translates ' " ' in ' [ ', how can I escape ' " '?
The tables are ok when used from every dbms tool, they belong to a used Access-based application.