troubleshooting Question

MySQL/Database Help

Avatar of adamrosshill
adamrosshill asked on
PHPMySQL Server
3 Comments1 Solution291 ViewsLast Modified:
I'm wondering if someone can explain this code a little for me the table is actualy jos_ezrealty I can understand where the defined variable for that is coming from however I'm a little confused where the a.* is reference and the letter in front of the code. thanks so much

   
$query = "SELECT a.*, u.mid AS mid, u.dealer_name AS dealer_name, u.dealer_company AS dealer_company, u.dealer_email AS dealer_email, 
	u.dealer_phone AS dealer_phone, u.dealer_mobile AS dealer_mobile, u.dealer_sms AS dealer_sms, u.show_sms AS show_sms, 
	u.dealer_image AS dealer_image, u.dealer_type AS dealer_type, u.logo_image AS logo_image, u.published AS dealerpublished, 
	p.mid AS amid, p.dealer_name AS adealer_name, p.dealer_company AS adealer_company, p.dealer_phone AS adealer_phone, 
	p.dealer_mobile AS adealer_mobile, p.dealer_sms AS adealer_sms, p.show_sms AS ashow_sms, p.dealer_image AS adealer_image, 
	p.dealer_type AS adealer_type, p.logo_image AS alogo_image, p.published AS adealerpublished, 
	q.username AS user1, r.username AS user2 FROM #__ezrealty as a"
	. "\n LEFT JOIN #__ezrealty_profile AS u ON u.mid = a.owner"
	. "\n LEFT JOIN #__ezrealty_profile AS p ON p.mid = a.assoc_agent"
	. "\n LEFT JOIN #__users AS q ON q.id = a.owner"
	. "\n LEFT JOIN #__users AS r ON r.id = a.assoc_agent"
    . "\n WHERE a.published = '1' AND a.id = $id";
    $database->setQuery( $query );
    $rows = $database->loadObjectList();
	$row = $rows[0];
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros