sasha85
11-09-2007, 07:56 PM
all i want to find is records with column 'agent' empty or null+column 'open' wiht 1+column 'sort' with variable ff...
when i writing this like that
mySQLp="SELECT * FROM crminfo WHERE open=1 AND sort='" & ff & "'"
it works perfectly!
but this it obly 2 conditions ...
when i add the agent condition it just tells me that there is no results and it can't be cause all the column 'agent' is or empty or null
i tried those ways
mySQLp="SELECT * FROM crminfo WHERE agent='' and open=1 AND sort='" & ff & "'"
mySQLp="SELECT * FROM crminfo WHERE agent=null and open=1 AND sort='" & ff & "'"
mySQLp="SELECT * FROM crminfo WHERE agent="" and open=1 AND sort='" & ff & "'"
it all not good ...why?? where i got wrong?
when i writing this like that
mySQLp="SELECT * FROM crminfo WHERE open=1 AND sort='" & ff & "'"
it works perfectly!
but this it obly 2 conditions ...
when i add the agent condition it just tells me that there is no results and it can't be cause all the column 'agent' is or empty or null
i tried those ways
mySQLp="SELECT * FROM crminfo WHERE agent='' and open=1 AND sort='" & ff & "'"
mySQLp="SELECT * FROM crminfo WHERE agent=null and open=1 AND sort='" & ff & "'"
mySQLp="SELECT * FROM crminfo WHERE agent="" and open=1 AND sort='" & ff & "'"
it all not good ...why?? where i got wrong?