Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2007
    Location
    Los Angeles
    Posts
    545
    Thanks
    81
    Thanked 5 Times in 5 Posts

    Can't echo LEFT JOIN field

    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 Code:
    $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
    RalphF
    Business Text Messaging Services
    https://www.MobileTextingService.com

  • #2
    Regular Coder
    Join Date
    Jun 2007
    Location
    Los Angeles
    Posts
    545
    Thanks
    81
    Thanked 5 Times in 5 Posts
    My code is working...I had one record that had a blank first_name...
    RalphF
    Business Text Messaging Services
    https://www.MobileTextingService.com


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •