
January 30th, 2013, 03:30 PM
|
|
Registered User
|
|
Join Date: Mar 2011
Posts: 10
Time spent in forums: 2 h 21 m 21 sec
Reputation Power: 0
|
|
|
PHP-DB - Problems with DB2
I only have two months with PHP. I am trying to access a DB database with ODBC but I have a problem and haven't found the solution in the Internet. My code is:
Code:
$dbconn = odbc_connect("xxx", "xxx", "xxx");
$statement = odbc_prepare ($dbconn, $sql);
$result = odbc_exec($dbconn, $statement);
I get the connection and the statement, but I get an exception getting the result.
If you can give me code to execute a select statement, that would help me too. I haven't been able to do it with what i have searched and i settled for ODBC>
Your help would be greatly appreciated.
|