
Hello all... I have a slight problem with a certain page. I have five tables: listing, towns, buildings, categories and sub-categories. The page that i wish to display will show the listings form the listing table in the database. The listing table contains a categoryid, subcategoryid, buildingid and townid. I would like to display all these fields as names, hence the need for the join. However, a sub-category may be null, hence the need for the left join. I created the query below which is returning no data. For the life of me, I can't diagnose the problem... HELP!! *$query_listing = "SELECT * FROM buildings, categories, towns, listing LEFT JOIN subcategories ON listing.listingcategory=subcategories.subcategoryid WHERE buildings.buildingid=listing.listingbuildingid AND categories.categoryid=listing.listingcategory AND towns.townid=listing.listingtownid";*