How do I select an array of all mysql rows of which in addition to a first condition, one of the columns has content in it. (column2 below)
Is this how I should do it?
mysql_query(" SELECT * FROM table
WHERE (column1 != '$var1') AND (column2 != "") ");
Thanks!
Remove unnecessary parentheses. they concerns Some of the optimizations performed by MySQL.
It should be like below :