help me to solve out the problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    help me to solve out the problem

    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



    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_page10;

       
    $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

    #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...
    _______
    Info & Tips
    php.net
    w3schools.com

    Comment


      #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

      Comment


        #4
        ORDER BY id DESC

        which format has the time row? is it a unix timestamp?
        Advertise your mobile site for FREE with AdTwirl

        Comment

        Working...
        X