In message <[EMAIL PROTECTED]>, Brian Cummiskey <[EMAIL PROTECTED]> writes >David wrote: >> thanks, I tried that: >> $item_query = " SELECT i.discount AS 'Inv Discount' , c.discount AS >> 'Cat Discount' , d.discount AS 'Dept Discount' FROM inventory i LEFT >> OUTER JOIN categories c ON (lower(i.category) = lower(c.category) AND >> lower(i.sub_ category) = lower(c.sub_ category) ) LEFT OUTER JOIN >> departments d ON i.department = d.department WHERE i.item_number = >> 'MB99467BCD' ; " ; >> >> and get this error message: >> >> You have an error in your SQL syntax. Check the manual that >> corresponds to your MySQL server version for the right syntax to use >> near 'category) = 'lower(c.sub_ category)' ) LEFT OUTER JOIN departme >> >> >sub_ category? looks like you added a space in there
...and some quotes - the quotes should only follow the three AS fieldnames and the item_number. -- Pete Clark Sunny Andalucia http://www.hotcosta.com/comm_1.htm
