View Full Version : Can't echo LEFT JOIN field

12-11-2008, 07:53 PM
The code below won't echo the first name data - it displays "first_name" instead of the actual data John Smith. What's wrong with my echo statement?

$php_SQL = "SELECT Accounts.first_name as f_name, Domains.cpanel_domain as d_domain".
" FROM Accounts".
" RIGHT JOIN Domains".
" ON Accounts.id = Domains.username_no".
" ORDER BY Domains.cpanel_domain";
$php_resultID = mysql_query($php_SQL, $php_linkID);
$php_row = mysql_fetch_object($php_resultID);
echo $php_row->first_name;

12-11-2008, 08:11 PM
My code is working...I had one record that had a blank first_name...