note 33112 added to function.odbc-exec

From: Date: Tue, 17 Jun 2003 06:29:40 +0000
Subject: note 33112 added to function.odbc-exec
Groups: php.notes 
Request: Send a blank email to php-notes+get-50463@lists.php.net to get a copy of this message
This opens select statements 'for update' by default in db2. If you're using db2, you have to tack on 'for read only' at the end to select from SYSCAT.TABLES, for example, without firing an error like Warning: SQL error: [IBM][CLI Driver][DB2/LINUX] SQL0151N The column "MAXFREESPACESEARCH" cannot be updated. SQLSTATE=42808 , SQL state 42808 in SQLExecDirect For example : $query = odbc_exec($conn, "select * from syscat.tables for read only"); odbc_result_all($query); will work (only for db2). I don't know about other databases. The select statement will work in the 'db2' command line, but not in php, because of this side effect. ---- Manual Page -- http://www.php.net/manual/en/function.odbc-exec.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33112 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33112&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33112&report=yes

« previous php.notes (#50463) next »