I am making a simple filtering system for visitor that the criteria they choose is either in "column1" or "column2".
I had a thread regarding to sorting few days ago and I had been told that I can use the clause "IFNULL" and "AS" to solve the problem, but when it comes to filtering it does not work...
anyway my SQL statement is:
PHP Code:SELECT *, IFNULL(column1,column2) AS finalcolumn FROM mytable WHERE finalcolumn='$visitor_criteria'


Reply With Quote
Bookmarks