this is to select thinks from any tabel of users budy
its working fine with that part its puling out the uid of budy but
the trouble is its not aranging as per the oder by time DESC
what to do any help
the out pit comes
here you can x the order of time is not ok
its working fine with that part its puling out the uid of budy but
the trouble is its not aranging as per the oder by time DESC
what to do any help
PHP Code:
$mems = mysql_query("SELECT uid, tid FROM ibwf_buddies WHERE (uid='".$uid."' OR tid='".$uid."') AND agreed='1'");
while($row=mysql_fetch_array($mems))
{
{
if($row[1]!=$uid)
$num=$row[1];
if($row[0]!=$uid)
$num=$row[0];
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_feds WHERE (uid='".$row[0]."' OR uid='".$row[1]."')"));
$num_items = $noi[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
//$bud = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_feds WHERE (uid='".$mems[0]."' OR uid='".$mems[0]."')"));
$notif = mysql_query("SELECT id, uid, text, time, cat, url FROM ibwf_feds WHERE uid='".$num."' ORDER BY time DESC LIMIT $limit_start, $items_per_page");
while($fnotif=mysql_fetch_array($notif))
{
»XXXXXXXXXXXXXXXXXXXXxx
7 h, 58 m, 2 s
»xXXXXXXXXXXXXXxxxxxxxxxxx.
8 h, 23 m, 58 s
»XXXXXXXXXXXXXXXXXXXXXxx
7 h, 53 m, 6 s
»XXXXXXXXXXXXXXXXXXXxx
7 h, 58 m, 12 s
»XXXXXXXXXXXXXXXXXXXXXXXXxx.
7 h, 58 m, 21 s
7 h, 58 m, 2 s
»xXXXXXXXXXXXXXxxxxxxxxxxx.
8 h, 23 m, 58 s
»XXXXXXXXXXXXXXXXXXXXXxx
7 h, 53 m, 6 s
»XXXXXXXXXXXXXXXXXXXxx
7 h, 58 m, 12 s
»XXXXXXXXXXXXXXXXXXXXXXXXxx.
7 h, 58 m, 21 s
Comment