I am attempting to retrieve column names from a table in DB2 using php. While I have a valid connection to the database, I cannot get the db2_columns function to return results. I'm very new to using DB2 and would appreciate any help or suggestions. The following is the code I am attempting:
$con = db2_pconnect($dbname, $username, $password);
[PHP]
if ($con) {
$schema = "%";
$tbl = "table1";
$store = db2_columns($con, "", $schema, $tbl, "");
echo db2_result($store, "COLUMN_NAME");[/PHP]
If I var_dump $store, I get the following:
resource(3) of type (DB2 Statement) bool(false)I know the connection works because I have been able to run sql and return results using the same connection. Thank you for all your help.
Jason
---------------------------------------------------------
http://www.elefoo.com/
http://www.blackspyraldancer.com/