Jump to content


Photo

unexpected '='


  • Please log in to reply
2 replies to this topic

#1 aebstract

aebstract
  • Members
  • PipPipPip
  • Advanced Member
  • 1,105 posts

Posted 17 June 2006 - 02:12 PM

result = mysql_query("SELECT * FROM friendslist WHERE userid = '$id'")
while($r=mysql_fetch_array($result))  {  
$friendsid=$r["friendsid"];  


$result2 = mysql_query("SELECT * FROM accounts WHERE id = '$friendsid' ORDER BY username DESC")
while($r2=mysql_fetch_array($result2))  {  
$username2=$r2["username"];  
 
$content .= "

$username2<br />

";
}
}

It's suppose to find out who is in your friendslist (a table with three columns flid (auto increment), userid (your personal id), and friendsid (their id). Should find the rows that match up with your id, then find the usernames of their id through the accounts table. If theres an easier way to do this that im missing let me know, but why the unexpected '='?

Parse error: syntax error, unexpected '=' in /home/.jaguar/onelastromance/carbenco.com/beta/pmbox.php on line 319

319 is while($r=mysql_fetch_array($result)) {

There is an area of the mind that could be called unsane, beyond sanity, and yet
not insane. Think of a circle with a fine split in it. At one end there's
insanity. You go around the circle to sanity, and on the other end of the
circle, close to insanity, but not insanity, is unsanity.


#2 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 17 June 2006 - 02:25 PM

You missed a semi-colon on line 318 then.
~ D Kuang

#3 aebstract

aebstract
  • Members
  • PipPipPip
  • Advanced Member
  • 1,105 posts

Posted 17 June 2006 - 02:31 PM

lol, thanks

There is an area of the mind that could be called unsane, beyond sanity, and yet
not insane. Think of a circle with a fine split in it. At one end there's
insanity. You go around the circle to sanity, and on the other end of the
circle, close to insanity, but not insanity, is unsanity.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users