Accessing tables with bad names
| From: | Sam | Date: | Thu, 24 Aug 2000 13:50:38 +0000 |
| Subject: | Accessing tables with bad names | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-13397@lists.php.net to get a copy of this message | ||
Hi all,
I am trying to access MS Access tables with names such as WWW, TRIP
CATEGORIES
This is a single table name,
I am accessing them using ODBC.
So my code looks something like this..
$r = odbc_exec( $db,"SELECT * from tablename ");
while (odbc_fetch_row($r)) {
odbc_result_all($r);
}
I'm fine when there are no spaces, but completely stuck when there are
spaces and commas in the table name.
Also there is no way that I can change the tablename in the database, as
this would have serious complications that I shall not bother you with...
Thanks in advance
Sam Rose