note 40013 rejected from function.sybase-query by nlopess

From: Date: Thu, 19 Feb 2004 13:44:03 +0000
Subject: note 40013 rejected from function.sybase-query by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-65396@lists.php.net to get a copy of this message
Note Submitter: chungf@ha.org.hk ---- 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.

« previous php.notes (#65396) next »