Posted by "Gustav Wiberg" on 10/04/02 11:23
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
Navigation:
[Reply to this message]
|