male buds

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

5 replies · 555 views · started 14 years ago · 1 min read

3 participants
brand Senior · 391 posts #1

hi there friends can some one please help me sort this error out please

$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";

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

HELP THEM WHO HELPS YOU

External image (may be gone)

i only work on wapdesire v_2 coding only

GumSlone Administrator Principal · 1,690 posts #4

$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 ";

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

GumSlone Administrator Principal · 1,690 posts #6

$sql="SELECT a.id, a.username, d.mood, b.uid, b.tid, b.date FROM users a WHERE a.sex='M' 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 ";

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

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