So I have a query
SELECT count(*) from table where cat='green' and state = state and product = product
Result: 15000
Now when I run the same query with an additional condition that should result to true
SELECT count(*) from table where cat='green' and state = state and product = product and lga = lga
Result: 0
Pls what on earth could be wrong???
I assume that lga=lga
should result to true just like 1=1
results to true
EDIT: Table schema:
id int(11) NO PRI NULL auto_increment
cat varchar(128) NO NULL
state varchar(8) YES NULL
lga varchar(20) YES NULL
product varchar(150) NO NULL
To add some more context, I have a page with filters, so the only way I can ensure that the filters are flexible is to implement it the way I did.