help in limit

Started on the old forum in January 2010 · view the original in the archive · old links redirect here

2 replies · 351 views · started 16 years ago · 1 min read

2 participants
icedroplet1987 Senior · 258 posts #1

hey friends.. i want to display 10 gbook msg... i am not getting how to set limit for it..

$scraps =   mysql_fetch_array(mysql_query("SELECT gbowner, gbsigner, gbmsg, dtime, id FROM ibwf_gbook WHERE gbowner='".$who."' ORDER BY dtime DESC LIMIT 10"));
icedroplet1987 Senior · 258 posts #2
$scraps =   mysql_fetch_array(mysql_query("SELECT gbowner, gbsigner, gbmsg, dtime, id FROM ibwf_gbook WHERE gbowner='".$who."' ORDER BY dtime DESC LIMIT 1, 5"));

$whose = getnick_uid($scraps[1]);
  $sign23 = htmlspecialchars($scraps[2]);
  $sign23 = parsepm($scraps[2], $sid);
Loony Senior · 258 posts #3

try something like this

$sql = "select * from ibwf_gbook WHERE gbowner='$who' ORDER BY dtime DESC LIMIT 10";
  $gbook = mysql_query($sql);
  while($l=mysql_fetch_array($gbook))
  {
    $gbowner = $l['gbowner'];
    $gbsigner = $l['gbsigner'];
$gbmsg = $l['gbmsg'];
$dtime = $l['dtime'];
$id = $l['id'];
  }
echo "$dbsigner($dtime)<br/> ";
echo "$gbmsg";

Creator of Epix.Mobi

Keep an Eye on us Big things coming soon!!!! Need something for your site hit me up here http://coding-talk.com/forum/main-forums/marketplace/153110-free-features-for-your-wapsite

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close