Re: mssql_fetch_row();

From: Date: Fri, 11 Apr 2003 15:00:07 +0000
Subject: Re: mssql_fetch_row();
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-143513@lists.php.net to get a copy of this message
Look for tutorials for building prev and next buttons, basicaly you need to use LIMIT clause in your query (check manual) Poon, Kelvin (Infomart) wrote:
Hi, In my script, I take our the first 20 entries of my SQL table like this: $query = "SELECT * FROM updateHistory WHERE AIX = '$search' ORDER BY VAX"; $result = mssql_query($query); for ($i = $start; $i < mssql_num_rows($result); ++$i) { $updateHistory = mssql_fetch_row($result); // code here.... $numRecord+=1; if ($numRecord==20) { break; } } THis code successfully processing the first 20 entries of the data I took out from the query. My question is, how do I take out the 21st to the 40th entries?...or 41st to 60th entries?..basically I want it to function so that it can process the 'next 20' each time. Please advise, thanks Kelvin


« previous php.general (#143513) next »