Page 1 of 1

small seelct help

Posted: Tue Feb 17, 2004 3:18 am
by pelegk2
i am making a select
and i want to select all the worws that the
col name date is empty! (nothing written there!!)
the dat col is of type : int(11) unsigned
and when i try in the select
where date=null
OR
where date=0
or
WHERE
date=''
none of this helps!
thanks in advance
peleg

Posted: Tue Feb 17, 2004 3:24 am
by patrikG
SELECT * FROM myTableName WHERE date=""

Note that, depending on which database you're using the column-name can be case-sensitive (e.g. it could be "Date" or "DATE" etc.).

i dont understand what u did where

Posted: Tue Feb 17, 2004 3:44 am
by pelegk2
the date=

Code: Select all

date=""
i did the same welect with date='' and it didnt work!

Posted: Tue Feb 17, 2004 3:50 am
by patrikG
Can you post your SQL statement please, and the table structure?

Thanks

Posted: Tue Feb 17, 2004 4:50 am
by patrikG
Btw.: Does the date-column default to 0 (since it's integer)?

this is the select

Posted: Tue Feb 17, 2004 5:50 am
by pelegk2

Code: Select all

select * from myDb where id=7 and done_date=''
and not its not default zero and i cantchange it to zero now