On Thu, 24 Apr 2008 at 10:16 -0400, [EMAIL PROTECTED] confabulated:
On Thu, Apr 24, 2008 at 2:54 AM, Sebastian Mendel
<[EMAIL PROTECTED]> wrote:
IMHO not in this case, cause it is just a simple "WHERE field IN ()"
I'm pretty sure that just looks like a bunch of ORs to MySQL. If it
didn't use the index with OR, it won't use it with IN.
What usually works is to change it to UNION:
SELECT wite_what, wite_desc FROM witelist
WHERE wite_what = '$oct1'
UNION
SELECT wite_what, wite_desc FROM witelist
WHERE wite_what = '$oct1.$oct2'
UNION
...etc.
I'm still new to MySQL. The input is greatly appreciated.
It took some minor thought and the documentation, but I understand what is
going on with the UNION.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]