MSSQL Paging Using PHP – ref only

This code ONLY for my reference..

<?php

echo $countXX = $rowCount[‘CC’]/50;

isset($_GET[‘x’])?$x=$_GET[‘x’]:$x=50;

if ($x ==50){ $start=1; $page=$x+50; }

else { $start = ($x50)+1; $page=$x+50;}

$sql =“SELECT * FROM (SELECT TOP 50 * FROM ( SELECT TOP $x * FROM

MY_USER ORDER BY NAMA ASC) AS newtbl ORDER BY NAMA DESC) newtbl2

ORDER BY NAMA”;

?>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s