help me to solve out the problem

Started on the old forum in September 2011 · view the original in the archive · old links redirect here

3 replies · 349 views · started 15 years ago · 1 min read

3 participants
love_444 Junior · 38 posts #1

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

$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))
{

the out pit comes

»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

here you can x the order of time is not ok

skils are gained by practis http://myguruworld.com/

subzero Super moderator Fellow · 3,954 posts #2

ASC mite do it. but you will need to confirm it to time like

ORDER BY time='time()' desc

But most of the time of updates in php has still got bugs sorry to tell you.

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

love_444 Junior · 38 posts #3

no bro this is not working .... the same trouble its not giving the order by time its giving by the order added in budy 🙁 »sanju send a friend reQuest to LeRnA.

15 h, 5 m, 44 s

»XXXXXXXXXXXXXXXXXXXXXXXx. 15 h, 5 m, 0 s

»XXXXXXXXXXXXXXXXXXXXXXXx.

54 m, 12 s

»XXXXXXXXXXXXXXXXXXXXXXXx..

15 h, 10 m, 49 s

»XXXXXXXXXXXXXXXXXXXXXXXx.

15 h, 10 m, 41 s

»XXXXXXXXXXXXXXXXXXXXXXXx. 15 h, 5 m, 34 s

»XXXXXXXXXXXXXXXXXXXXXXXx.

4 h, 2 m, 56 s

skils are gained by practis http://myguruworld.com/

Write your reply now; next you create a free account (or sign in) and it is posted right away. 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