[snip] > There is your problem. Return ALL of the records, then use > mssql_data_seek to move about. [snip]
OK, I'm returning all the rows and no change. Code: $query = "SELECT DISTINCT q.questions FROM SG_Questions as q, SG_QuesRef as r WHERE r.pos_id = '$pos' AND r.sic_id = '$sic' AND r.cat_id = '$cat' AND r.ques_id = q.ques_id"; $result = mssql_query($query) or die("Can not execute query $query. "); for ($i = $paging; $i < $paging + $limit; $i++){ $cnt = mssql_data_seek($result, $i); $row = mssql_fetch_array($result); ...etc... alex hogan ****************************************************************** The contents of this e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. The views stated herein do not necessarily represent the view of the company. If you are not the intended recipient of this e-mail you may not copy, forward, disclose, or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error please e-mail the sender. ******************************************************************