Hi guys,
I have problems with multiple “AND” statement from 2 tables.
I have this WORKING mysql query :
$items = “SELECT * FROM products, users WHERE users.email=‘email@email.com’ AND products.code=users.code ORDER BY time DESC LIMIT 30”;
And when I add one more statement it just returned error:
$items = “SELECT * FROM products, users WHERE users.email=‘email@email.com’ AND products.code=users.code AND products.pricea < products.priceb ORDER BY time DESC LIMIT 30”;
“AND products.pricea < products.priceb” this give me problems.
Any solution for this?
Thanks