OLM3CA Posted September 16, 2006 Share Posted September 16, 2006 Hi I am having problems with the paging search results.Please help me I am trying to solve this for 3 hours.I think I have problem with the query of paging.My codes are below :[code]$m = ($_REQUEST['m']); if ( ! $m) { $m = "0"; }$querym = "SELECT * FROM topic WHERE status=1 limit $m,10";$resultm = mysql_query($querym);$rowm= mysql_num_rows($resultm); while($row = mysql_fetch_array($resultm)) { if(preg_match("/$word/i", $row['words'])) { echo $row['name']; echo $row['msg']; $arama_sonuc++; } $toplam_sonuc++; }echo "Pages:";$i=0; while ( $i < $rowm) { $a = $a + 1;echo "<a href='ara3.php?m=$i'>$a</a>";$i = $i + 2;}[/code] Quote Link to comment Share on other sites More sharing options...
shocker-z Posted September 16, 2006 Share Posted September 16, 2006 $resultm = mysql_query($querym);can be changed to$resultm = mysql_query($querym) or die(mysql_error());which will tell u where and what the error isAs far as i can see it looks like$querym = "SELECT * FROM topic WHERE status=1 limit $m,10";needs to be$querym = "SELECT * FROM topic WHERE status='1' limit $m,10";i probs have status set as a varchar instead of intRegardsLiam Quote Link to comment Share on other sites More sharing options...
OLM3CA Posted September 16, 2006 Author Share Posted September 16, 2006 Thanx for your reply but i have no error with page it works correct but i only see page 1 not the others ... Quote Link to comment Share on other sites More sharing options...
OLM3CA Posted September 16, 2006 Author Share Posted September 16, 2006 ı am sorry for this spam but i really need help please Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.