In message <[EMAIL PROTECTED]>, Ryan Cozzubbo
<[EMAIL PROTECTED]> writes
>Hi,
>
>I'm not sure if this is correct, I'm learning too...
>could something like this work:
>
>select table1.field1, table2.description from table1 left join table2
>on (tabl1.field1 = table2.identifier)
>
>if table2 doesnt contain a description it will return NULL

I was trying to get rid of the NULL.  This is as close as I can get.
Then I need to change the NULL to ''.  But I feel like I am missing
something simple here.

>
>or if you want to skip 0
>
>try
>
>select table1.field1, table2.description from table1 left join table2
>on (tabl1.field1 = table2.identifier) where table1.field1 > 0

This won't work for me, because I also have (and should have mentioned!)
table1.field2, table1.field3.  - and this just doesn't return anything
if field1 is 0.

>
>Ryan.
>www.badblock.com

-- 
Pete Clark

http://www.hotcosta.com
http://www.spanishholidaybookings.com




The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to