what's quicker: pg_result or pg_numrows

From: Date: Mon, 18 Dec 2000 17:40:54 +0000
Subject: what's quicker: pg_result or pg_numrows
Groups: php.general 
Request: Send a blank email to php-general+get-30875@lists.php.net to get a copy of this message
All I want to know is if the result returned any rows; if there are none, I'll to something, else nothing. What is quicker, checking whether the first row exists by doing if (!pg_result($result,0,0)) { . . do stuff or by checking pg_numrows, as in if (pg_numrows == 0) { . . do stuff I dimly recall having heard somewhere that pg_numrows would count all rows returned when called. This would be bad because there could be lots. I just want to know if there are any or not. Comments? - Frank

« previous php.general (#30875) next »