hi there friends can some one please help me sort this error out please
ERROR:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a INNER JOIN buds b ON (a.id=b.uid) OR (a.id=b.tid) INNER JOIN online c ON (a.' at line 1 -
i am trying to get my buddylist to just pick male friends online only
thanks to who ever helps me out
Code:
$sql="SELECT a.id, a.username, d.mood, b.uid, b.tid, b.date FROM users WHERE sex='M' a INNER JOIN buds b ON (a.id=b.uid) OR (a.id=b.tid) INNER JOIN online c ON (a.id=c.uid) INNER JOIN profiles d ON (a.id=d.uid) GROUP BY 1,2 LIMIT $limit_start, $items_per_page "; $items=mysql_query($sql); $main.=mysql_error(); while($item=mysql_fetch_array($items)) if(($siteimage[0]!="")){$iml=getbbcode($siteimage[0],$sid,1);} $bmsg=getbbcode($item[2],$sid,1); if($bmsg!=""){$budmood="($bmsg)";} else{$budmood="";} $sex=mysql_fetch_array(mysql_query("SELECT sex FROM profiles WHERE sex='M'")); if($sex[0]=="M"){$sex="<img src=\"./images/male.gif\" alt=\"(M)\"/>";$color=" style=\"color:#0000FF\"";} if($sex[2]==1&&$sex[3]!=""){$item[2]=getbbcode($sex[3],$sid,1);} $main.=$male.$lvl."<a href=\"../profile.php?who=$item[3]&sid=$sid\"$color>".$item[0]."</a>".$hide." - ".$item[2]."<br/>\n";
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a INNER JOIN buds b ON (a.id=b.uid) OR (a.id=b.tid) INNER JOIN online c ON (a.' at line 1 -
i am trying to get my buddylist to just pick male friends online only
thanks to who ever helps me out
Comment