I am fetching data from two tables using query with WHERE
clause. Query is working fine in local xampp
but when I try to run same query in online phpmyadmin
then it showing all available result(instead of filtering with WHERE clause). In other words, in online phpmyadmin
, it’s completing ignoring the WHERE
clause like it’s not even present in query, and showing all results.
Why it is not working online? Any idea?
SELECT * FROM `customers` E
JOIN `customer plans` D ON (E.ID = D.`Cust ID`)
WHERE E.`Email` = 'abc1002'
OR E.`Phone` = 'abc1002'
OR E.`Case ID` = 'abc1002'
OR D.`Customer ID` = 'abc1002'
2
Answers
You can try below – using OR condition within parenthesis
You can try this type of join: