note 40013 added to function.sybase-query

From: Date: Thu, 19 Feb 2004 01:37:42 +0000
Subject: note 40013 added to function.sybase-query
Groups: php.notes 
Request: Send a blank email to php-notes+get-65359@lists.php.net to get a copy of this message
I'm not sure if this is standard behaviour, but sybase_query() consistently returns the value 1 if the query itself would return 0 rows. Example: $r1 = sybase_query('select Code from Items where 1=0'); // This query should return 0 rows echo "$r1\n"; // This prints "1" $r2 = sybase_query('select count(*) from Items'); // This should return exactly 1 row echo "$r2\n"; // This prints "Resource id #x" Just in case this is platform-specific: The client is running PHP 4.3.3, sybase_ct, and FreeTDS 0.61, and the server runs Sybase 11. ---- Manual Page -- http://www.php.net/manual/en/function.sybase-query.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+40013 Delete -- http://master.php.net/manage/user-notes.php?action=delete+40013&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+40013&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#65359) next »