Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003

    Unanswered: RE: MySQL/ODBC/PHP problem

    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:
    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

  2. #2
    Join Date
    Dec 2002
    Why are you using ODBC? PHP has built in commands for MySQL.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts