I have the following setup, and i need to pretty much perform a quad join as far as i am aware. But im not sure how i would write the sql query. and do i have all the fields in each table required to join them all together? thanks heaps
i tried this, but it dont work properly
$query_rslist_classifieds = sprintf("SELECT c.catID, c.catname, a.item_name, a.item_desc, a.item_image, p.phone FROM classified_cats c, classified_ads a, customer p, magazine m WHERE a.fk_catID = c.catID AND a.fk_customerID = p.customerID AND a.fk_magID = m.magID AND c.catID = %s AND m.magname = 'AJM'", $colname_rslist_classifieds);
/*
TABLES:
classifieds_ads: adID, fk_catID, fk_customerID, fk_magID, item_name, item_desc
customer: customerID, company_name, phone, email
classified_cats: catName, catID
magazine: magID, magname, current
I NEED TO ECHO: (but this first: magname = 'AJM', current = 'Y')
item_name
item_desc
company_name
phone
email
*/