I'm not sure if this is a PHP or a MySQL problem. I'm running Red Hat 9, with MySQL 4.0.16, PHP 4.2.2, nuxODBC and MyODBC3.51. When I try execure a query using odbc_exec(), I get the following error:
Warning: SQL error: [unixODBC][MySQL][ODBC 3.51 Driver][mysqld-4.0.16-standard]Option value changed to default static cursor, SQL state 01S02 in SQLExecDirect...
The code used is given below:
require_once('DB/odbc.php');
include 'DB.php';
$connection = odbc_pconnect("odbc3","newuser","pass");
$query = odbc_exec($connection,"SELECT * FROM Staff");
According to all the PHP manuals I've read odbc_exec() takes two parameters; and odbc_connect takes three (the third being optional). Therefore I don't understand the "Option value changed..." stuff.
Although the message is just a warning, it does not return a valid ODBC result resource.
I cannot seem to resolve the problem, after searching extensively.
Any help would be greatly appreciated.
Josh Lewis