[PHP-DB] Re: MySQL JOIN problem

2003-03-14 Thread Cam
SELECT a.report_id, a.lib_id, a.exclude, b.lib_name, b.city FROM reportinfo a LEFT JOIN libinfo b ON a.lib_id = b.lib_id WHERE reportinfo.quarter != '0' the above statement will return ALL values within the reportinfo table that have a quarter value NOT set to 0. it will return the relevant

[PHP-DB] Re: MySQL JOIN problem

2003-03-11 Thread Joel Colombo
too busy or lazy to write it out right now but hereTaken from page : http://www.mysql.com/doc/en/JOIN.htmlmysql SELECT table1.* FROM table1 -LEFT JOIN table2 ON table1.id=table2.id -WHERE table2.id IS NULL; This example finds all rows in table1 with an id value that is