![]() |
| ||
| display fix set of data in table.... Hi guys...Good morning...I have following code. <?php $pid=$_GET['pid']; $conn=mysql_connect('localhost','root','') or die("Cannot connect to server"); mysql_select_db('developer',$conn) or die("Cannot connect to database"); $sql="select cnode,item,pnode from listviews where cnode='$pid'"; $res=mysql_query($sql) or die("Cannot execute query"); while($ar=mysql_fetch_array($res)) { $itm=$ar[1]; $pid=$ar[0]; } $sql="select cnode,item,pnode from listviews where pnode='$pid'"; $res=mysql_query($sql) or die("Cannot execute query"); echo "<table border='1'>"; if($pid==0) echo "<th colspan=2>Parent Items</th>"; else echo "<th colspan=2>$itm</th>"; while($ar=mysql_fetch_array($res)) { echo "<tr><td>$ar[0]</td><td>$ar[1]</td>"; } echo "</table>"; ?> Now i want to display only five rows per page...and using next button i want to see next five records...How it is possible to display it using PHP...This page is called by ajax script...Please show me the way...Thank you... |
| ||
| Re: display fix set of data in table.... |
| ||
| Re: display fix set of data in table.... Simplest 'next-forward' script, just to get the idea on how it works. You will find much more efficient code on the net. <?php Cheers, Nav |
| All times are GMT -4. The time now is 12:25 am. |
Forum system based on vBulletin Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
©2003 - 2010 DaniWeb® LLC