RE: [PHP-DB] odbc_columns()
| From: | Andrew Hill | Date: | Wed, 30 Jan 2002 14:56:44 +0000 |
| Subject: | RE: [PHP-DB] odbc_columns() | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-16311@lists.php.net to get a copy of this message | ||
Scott,
odbc_columns can take a lot of arguments, but the only one you need to pass
is a connection id.
It'll return a result identifier containing lots of info on your field
names:
$conn_id = odbc_connect($dsn, $usr, $pwd) or die (odbc_error());
$result_id = odbc_columns($conn_id) or die (odbc_error());
odbc_result_all($result_id);
Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software http://www.openlinksw.com
Universal Data Access & Data Integration Technology Providers
> -----Original Message-----
> From: Scott Teglasi [mailto:scotty@mediaglue.net]
> Sent: Tuesday, January 29, 2002 9:01 PM
> To: php-db@lists.php.net
> Subject: [PHP-DB] odbc_columns()
>
>
> Hi. Have a question:
>
> I've tried using the odbc_columns() function to get a list of
> columns in an
> access database connected via an ODBC System DSN.. However, I haven't had
> much luck in trying to use it. The manual page doesn't really cover much
> about it, and I noticed a few comments posted there (on www.php.net)
> mentioning that it was a pretty badly documented function.
>
> In any case, there were notes on how to use it with MS SQL 7, but none on
> just plain access databases.
>
> All I want to get is a list of field names in a table. What would the
> proper syntax be to do that?
>
> Any help would be appreciated.
>
> Thanks,
>
> Scotty
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
>