SELECT * FROM `sohh` WHERE `sohhid` = '9784' AND sohhid = '9785' AND sohhid = '9779'
How come this is not working? It executes but doesnt display the results in phpmyadmin. All sohhid numbers are valid rows but it doesnt display the results.
Try this:
SELECT * FROM `sohh` WHERE `sohhid` = '9784' OR sohhid = '9785' OR sohhid = '9779'
I think u try to write something like this:
You're trying to select where one field (sohhid) has three separate values. That's not likely to happen. Try changing AND to OR or or or ||. (Edit: As bogyou & mjax already said. 🙂 )
BTW, you can lose the backticks (or be consistent with them).
This worked like a charm, thanks!