1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Mysql and php help

Discussion in 'PHP' started by MTA, Jan 18, 2009.

  1. #1
    $e = mysql_query("SELECT * FROM `buddy` WHERE `user` = '$VAR[4]' OR `user1` = '$VAR[4]'");
    $e2 = mysql_num_rows($e);
     while ($f = mysql_fetch_array($e))
    if ($f['user'] == $VAR[4]) { 
    			$buddy = $f['buddy'];
    		} elseif ($f['user1'] == $VAR[4]) {
    			$buddy = $f['buddy1']; 
    $a = mysql_query("SELECT * FROM `mood` WHERE `userid` = '$buddy' ORDER BY 'date' ");
    	$b = mysql_num_rows($a);
    while ($f = mysql_fetch_array($a))
    $mood_image['moodimage'] = uimage($f['userid'],"60",4,"");
    echo '<li><strong>'.$mood_image['moodimage'].'</strong><img src=\'css/images/bullet.gif\' alt=\'-\' />'.$f['mood'].' '.$f['status'].'</li>';
    }		}
    Code (markup):
    Here is my code.. I having problems when it prints out.. its not showing the news one on top.. i am not sure what else I can do.. or if I am doing something wrong
    MTA, Jan 18, 2009 IP
  2. Danltn

    Danltn Well-Known Member

    Likes Received:
    Best Answers:
    Trophy Points:
    Remove the quotes around:
    Danltn, Jan 18, 2009 IP