Forget everything i said, now i realize that i didn't understand the problem very well. Francisco Reinaldo is right, use LEFT JOIN. Sorry for having replied that!
On Thu, 2002-07-25 at 20:40, Kevin wrote: > Hello, > > I have a query that runs perfectly until one of the items has no value or is > set to 0: > > SELECT > item.*, color.Name AS COLOR, > shapecode.Shape AS SHAPE, > clarity.Name AS CLARITY > FROM item, color, shapecode, clarity > WHERE > clarity.ID = item.CLARITY_ID > AND shapecode.ID = item.SHAPE_ID > AND item.COLOR_ID = color.ID > AND ITEM_ID='MA603' > > If the item.CLARITY_ID has no value or a value of 0 (which there is no > defined value for in the clarity table), then the query fails. > > Can anything be done without adding more login in the code? > > Thanks -- Diana Soares --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php