Jump to content

unexpected '='


aebstract

Recommended Posts

[code]
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 />

";
}
}
[/code]

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)) {
Link to comment
https://forums.phpfreaks.com/topic/12238-unexpected/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.