Duke, Brian wrote:

I have a question about spaces in fieldnames.
locally running Access03 and using MyODBC3.51 to populate a MySQL40 database.

The Database name and table names are ok.
It's the field names I am having trouble with. The tables are huge and there are 26 tables.
The ODBC process completes but due to Access insistance on nonconformity it creates tables with spaces in the field names. Example:


db=lergdb
table=LERG_6
field =LERG_6.SHA INDICATOR

I could manually go in and rename every field but this database needs to migrate weekly.
All my scripts are php based. My issue is I can't figure out how to tell php to query a field on a table with a space in the name:


$query="SELECT LERG_6.SWITCH, 'LERG_6.SHA INDICATOR' FROM LERG_6 WHERE 'LERG_6.SHA INDICATOR' = 00;"

returns either an error or :

NOGLEXADS0 LERG_6.SHA INDICATOR

can someone help me either fix my ODBC load or help me correctly syntax my php query line?


Try using backticks: `field with spaces`

And try migrating away from Access, or you'll be increasingly more sorry as your project increases in size.


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to