I'm trying to figure out a way to do a more efficient join on four tables. The main table is products, with the other tables being common options for the products. It's pretty well normalized, but am I doing these joins properly or is there a more efficient way? This looks pretty ugly to me.
--------------------------------------------- $q = "SELECT man.name as brand, category.proper as propername, products.* FROM manufacturers as man, products, category, type WHERE products.catid = category.catid AND man.manid = products.manid AND type.type_id = products.type_id AND category.name = '".$category."'"; if (isset($type)) { $q .= " AND type.type = '".$type."'"; } --------------------------------------------- Any suggestions, or am I ok on this? Much thanks, Mike -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]