note 46958 added to function.sybase-query

From: Date: Thu, 28 Oct 2004 16:21:46 +0000
Subject: note 46958 added to function.sybase-query
Groups: php.notes 
Request: Send a blank email to php-notes+get-79276@lists.php.net to get a copy of this message
I am using PHP 4.1.1 to connect to an older version of Sybase that doesn't work with CT. I found that while attempting to execute an erroneous query, sybase_query() never returns false for non-select query statements. This was reported as a bug but then dismissed because the problem is that Sybase itself does not indicate any error to PHP. However I appear to have found a workaround: after each query statement, call sybase_get_last_message(). If that function returns you anything, it will be an error message. Then you know your non-select query has truly failed. ---- Manual Page -- http://www.php.net/manual/en/function.sybase-query.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+46958 Delete -- http://master.php.net/manage/user-notes.php?action=delete+46958&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46958&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46958&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46958&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46958&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46958&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+46958&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#79276) next »