aebstract Posted June 17, 2006 Share Posted June 17, 2006 [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 319319 is while($r=mysql_fetch_array($result)) { Link to comment https://forums.phpfreaks.com/topic/12238-unexpected/ Share on other sites More sharing options...
poirot Posted June 17, 2006 Share Posted June 17, 2006 You missed a semi-colon on line 318 then. Link to comment https://forums.phpfreaks.com/topic/12238-unexpected/#findComment-46659 Share on other sites More sharing options...
aebstract Posted June 17, 2006 Author Share Posted June 17, 2006 lol, thanks Link to comment https://forums.phpfreaks.com/topic/12238-unexpected/#findComment-46663 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.