Fast count of recordset in php...

From: Date: Sat, 06 Aug 2005 20:20:02 +0000
Subject: Fast count of recordset in php...
Groups: php.general 
Request: Send a blank email to php-general+get-220152@lists.php.net to get a copy of this message
Hello there! How do i get a fast count of a recordset in php? Look at this code: $sql = "SELECT COUNT(IDVara) cn FROM tbvara WHERE Varunamn LIKE '$checkLev%'"; $querys = mysql_query($sql); //Count products in db // $dbArray = mysql_fetch_array($querys); $nrOfProducts = $dbArray["cn"]; It's slow... Why? Any suggestions? /mr G @varupiraten.se

« previous php.general (#220152) next »