mssql and paging

From: Date: Wed, 26 Jan 2005 15:53:23 +0000
Subject: mssql and paging
Groups: php.general 
Request: Send a blank email to php-general+get-207390@lists.php.net to get a copy of this message
Hello Is there anybody who succed in doing per/page listing from a MS SQL Server db. knowing that mssql doesnt support LIMIT like mysql and it uses TOP. i didnt find an optimized way to make a per/page script. Here's what am doing know : to replace a MySQL "SELECT FROM ........ LIMIT $x,$y" i did this with MSSQL : :1 $query = "SELECT FROM ........"; //Without limit :2 $ligne = fetch_assoc(query_bd($query)); :3 $temp = Array(); :4 for ($i=$debut;$i<($x+$y);$i++) { :5 if (isset($ligne[$i])) :6 $temp[] = $ligne[$i]; :7 } :8 $ligne = $temp; am loosing time between lines 4 to 7 when i have a big big array :(

« previous php.general (#207390) next »