Errors getting count(*) result

From: Date: Wed, 16 Aug 2000 17:02:29 +0000
Subject: Errors getting count(*) result
Groups: php.db 
Request: Send a blank email to php-db+get-2090@lists.php.net to get a copy of this message
<scratching head> Trying to get a count of records so I can do a random grab, but for some reason I'm getting the wrong number back. If I enter the SQL query SELECT count(*) FROM amazoncd into MS Query, I get the right answer, which is 22. If I use the following code to test the same query: $connect = odbc_connect("blah", "blah", "blah"); $cntquery = "SELECT count(*) FROM amazoncd"; $result = odbc_exec($connect, $cntquery); echo $result; I get 2. Not 22. 2. Very confused. </scratching head> -- Ian Evans Chairman & Executive Producer Digital Hit Entertainment http://www.digitalhit.com

« previous php.db (#2090) next »