utgraeme — 2002-01-31T02:18:50-05:00 — #1
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?
joyce — 2002-01-31T02:26:31-05:00 — #2
SELECT * FROM uicomments WHERE ID='$id' AND type='$type'
utgraeme — 2002-01-31T02:44:05-05:00 — #3
LOL, I can't believe I left out the quotes.
It works now, thanks joyce
joyce — 2002-01-31T02:48:48-05:00 — #4
firefly — 2002-01-31T06:45:50-05:00 — #5
You don't need quotes around numbers, just strings.
mittineague — 2014-09-24T03:23:19-04:00 — #6
This topic is now archived. It is frozen and cannot be changed in any way.