Too messy for anything. And READ the mysql and php manuals. You should NEVER use the root account to access the database. ALWAYS create a user to access from the web pages. Some server installs do not permit root to access the database from scripts.
$connect = mysql_connect("localhost","created_user","user_password") or die ("Could not connect ".mysql_error());
mysql_select("database_name") or die ("Could not select database ".mysql_error());
You are far better to NOT use the strings before the mysql_error(), as the system will report these errors correctly. And then turn of error reports for an active site once you have the system working, as they can give away enough detail to aid hackers.
But if you read the error report you are getting properly, neither of your statements has more than one line. So the error is somewhere else in your script. You are looking for something like :
$res = mysql_query (select id, fname, lname, address1, address2, address3, country from user u left join addresses a on a.user_id = u.id where u.id = '99' ",$connection);
In other words the error is from a multi line statement. I normally use this for errors so that I can locate the actual cause :
//first error check, maybe the connection above :
or die("1 ".mysql_error());
Second check, maybe selecting DB :
or die("2 ".mysql_error());
Third check, the select query :
or die("3 ".mysql_error());
and keep this sequence going through the script. That way you can go straight to the particular query and save a lot of grief when the error message is as limited as the above.