Hi All,

 

I have searched for some references on pagination using mssql but have come
up empty.

 

I have looked at the tutorials on Zend and just about everywhere else but
unfortunately they all use LIMIT in the sql statement and the closest thing
to that in mssql is either TOP n, or SET ROWCOUNT which does me no good.

 

My thoughts were to bring in all the recordsets and parse through them line
by line to only show the ones that I want for the page that is displayed.
Part of my solution is below but I kekep getting this error;

 

Parse error: parse error, unexpected ')', expecting ';' in
D:\WWW\scriptgen\pagination_test.php on line 25

 

This is the code;

 

$limit = 10;

for ($i = 0; $i < $limit; $i++){ -- This is line 25

            $name = mssql_result($i);

            if($bgcolor == "#F2F7FF"){

                        $bgcolor = "#FFFFFF";

            }

            else{

                        $bgcolor = "#F2F7FF";

            }

            echo "<tr><td width=85% class=\"normal_text\"
bgcolor=\"$bgcolor\">$name</td></tr>\n";

}

 

Something wrong with my syntax?

 

 

alex hogan

 

P.S.  OP is original poster isn't it...., damn..., I need to start drinking
decaf.



****************************************************************** 
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. 
****************************************************************** 


Reply via email to