note 40362 added to function.odbc-tables
| From: | iggvopvantoodlwin at rn2 dot php dot net | Date: | Mon, 01 Mar 2004 12:42:10 +0000 |
| Subject: | note 40362 added to function.odbc-tables | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-66040@lists.php.net to get a copy of this message | ||
With regard to the note made on results not working.
Test the database with the easy:
odbc_result_all(odbc_tables($db));
$db is obviously a connected batadase. Then start to experiment:
if(!$odbcr=odbc_tables($db,"udb","", "%",
"'TABLE'"))
"udb" is the DNS - aka 'name of my ODBC database in the Windows ODBC thingamy'.
In result_all the full path was shown but I just used the name I assigned; either should work.
The second parameter "" is listed by result_all as "TABLE_SCHEM" and all items
were "NULL", so I have put "".
The third parameter is "%". According to result_all this col is "TABLE_NAME", so
I could have put the name of one of my tables, i.e. "Address".
In my case I have an Access database setup with several tables. In ODBC I have created a link.
Running the all on everything result above shows a set of system tables which I do not need to know
about at this point so I look at the result and then build my new table check using the
"TABLE" string as the tables I am interested in are listed as "TABLE" under
their "TABLE_TYPE" column.
----
Manual Page -- http://www.php.net/manual/en/function.odbc-tables.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+40362
Delete -- http://master.php.net/manage/user-notes.php?action=delete+40362&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+40362&report=yes
Search -- http://master.php.net/manage/user-notes.php