hey,
i have problem with paging,i need to use two tables to fetch data.
i am submitting my developed code. i hope some body will help me.
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("dummy1") or die(mysql_error());
$START=$_GET['start'];
if(!$START)
{
$START=0;
}
$data = mysql_query("SELECT * FROM scrapmsg ORDER BY date DESC") or die(mysql_error());
$total = mysql_num_rows($data);
$LIMIT = 4;
$NEXT=$START+$LIMIT;
$PREV=$START-$LIMIT;
//This is your query again, the same one... the only difference is we add $max into it
$data_p = mysql_query("SELECT scrapmsg.ucode,scrapmsg.myomsg, acountseting.usercode, acountseting.fnm, acountseting.imgpath ". "FROM scrapmsg, acountseting "."WHERE scrapmsg.rcode = acountseting.usercode ORDER BY scrapmsg.rcode DESC LIMIT $START,$LIMIT") or die(mysql_error());
//$query = "SELECT scrapmsg.ucode,scrapmsg.myomsg, acountseting.usercode, acountseting.fnm, acountseting.imgpath ". "FROM scrapmsg, acountseting "."WHERE scrapmsg.rcode = acountseting.usercode ORDER BY scrapmsg.rcode DESC";
while($info = mysql_fetch_array( $data_p ))
{
if($info['usercode'] == $current_img)
{
print $info['ucode'] . " to " . $info['rcode'];
print $info['myomsg'];
print "<br>";
}
}