syntax of "odbc_columns" ??
| From: | Michael Geary | Date: | Mon, 18 Sep 2000 22:49:31 +0000 |
| Subject: | syntax of "odbc_columns" ?? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-2955@lists.php.net to get a copy of this message | ||
Hi All,
I'm new to PHP4, but am enjoying some limited success integrating it with a
MS-Access (ODBC) database.
I am creating a PHP function which will automatically analyze the columns in
a
given table and generate .php pages which allow HTML administration of the
table
(add, delete, edit DB records). Sounds like it's basically an ODBC version
of myPHPadmin.
I'd like to make this as flexible as possible, and to this end, I want to
query a
specific table and retrieve the specific column information. When I code:
$allColumns = odbc_columns($db);
I get a database dump of ALL columns in ALL tables ($db is my database
connection).
Here's what I don't understand: How do I use the optional parameters in the
odbc_columns function to restrict the output to only one table? I've tried:
$allColumns = odbc_columns($db,"","","thistable","");
but I keep getting SQL errors:
SQL error: , SQL state 00000 in SQLColumns....
Can anyone please offer any insights? I'm sure this is possible....
Thanks,
michael geary