| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Dan Nelson | Date: | October 15 2003 8:25pm |
| Subject: | Re: OR in MySQL statement? | ||
| View as plain text | |||
In the last episode (Oct 15), Mike At Spy said: > How could I write a statement that uses something like 'OR' as a > case. Like this: > > SELECT * FROM list WHERE name = '$this1' OR name = '$this2' OR name = > '$that1' Exactly like you wrote it. You can also use WHERE name IN ('this1', 'this2', 'this3'), which is a bit shorter. -- Dan Nelson dnelson@stripped
| Thread | ||
|---|---|---|
| • OR in MySQL statement? | Mike At Spy | 15 Oct |
| • Re: OR in MySQL statement? | Gabriel Ricard | 15 Oct |
| • Re: OR in MySQL statement? | Dan Nelson | 15 Oct |
| • Re: OR in MySQL statement? | Colleen Dick | 16 Oct |
| • Re: OR in MySQL statement? | Nitin | 16 Oct |
