Click to See Complete Forum and Search --> : mysql null question


ixxalnxxi
03-25-2008, 07:28 PM
my query is as follows,

SELECT * FROM Orders WHERE OrderID = $_GET[OrderID] AND Orders IS NOT NULL

i'm trying to collect the data from the row with that orderid and if the data is not null. i am familiar with 'AND ColumnName IS NOT NULL', but how would i replace ColumnName with something that represents every column in the table?

Nedals
03-25-2008, 09:07 PM
You could specify every column, but not a good idea

If 'every column' is null, then you should probably delete those rows.
Failing that you could do something like...

SELECT * FROM Orders WHERE OrderID=$_GET[OrderID] AND OrderID>0