I know I've seen this asked before, but I can't seem to find it. How do I put two different conditions within the WHERE clause in a MySQL query. For example, I tried this:
SELECT * FROM uicomments WHERE ID=$id AND type=$type
but I just got an error. Can anybody tell me how to do this properly?
SELECT * FROM uicomments WHERE ID='$id' AND type='$type'
LOL, I can't believe I left out the quotes.
It works now, thanks joyce
You don't need quotes around numbers, just strings.
This topic is now archived. It is frozen and cannot be changed in any way.