I have a client who would like a web based portal page to their existing client database. They would like their clients to see limited information concerning their accounts. The program they are currently using (and they will not get rid of it), uses ACCESS as its database.
My ODBC connection works great. My challenge comes when I need to use a where clause in the query when the field name has a space in it, i.e. Patient Number. I've tried ',",`,[] and nothing works. I keep getting the No Tuples... error message. I'm running the portal on a linux system. Is there anything else I can try. I have test the query using a field name that has no space and it works fine. I'm trying to avoid converting the database to a mysql every night because it is about 2GB in size.
Thanks for your help.
[SOLVED]ACCESS & PHP Select Query Issue
Moderator: General Moderators
[SOLVED]ACCESS & PHP Select Query Issue
Last edited by chull on Sun Jun 28, 2009 9:30 pm, edited 1 time in total.
-
patrickmvi
- Forum Commoner
- Posts: 32
- Joined: Mon Jun 22, 2009 6:45 am
- Location: Fort Lauderdale, FL
Re: ACCESS & PHP Select Query Issue
All of the posts I found suggest to use the [] so if your field name was "first name" then you would do:
SELECT [first name] AS first_name FROM mytable
It says you already tried that but I didn't know if you tried it with the "AS" portion.
SELECT [first name] AS first_name FROM mytable
It says you already tried that but I didn't know if you tried it with the "AS" portion.
Re: [SOLVED]ACCESS & PHP Select Query Issue
This ended up working \"Field Name\".