I'm working on a PHP script which will already have gathered a large array of string values from a text file. These values will correspond to item numbers in a MySQL table. What I need to do is select rows in the table based on whether or not their "item_number" values are in the pre-existing PHP array. (The idea here is that the website's inventory comes in as a text file. I need to compare that inventory with the items contained within the table and disable the catalog items which are not in current inventory.)

Something like this (obviously not real code, just an illustration of what I'm trying to get):

SELECT * in $mytable WHERE in_array('item_number', $arrayfromtextfile) = true

Of course, in_array() is a PHP function, but I'm hoping there is something similar available in MySQL.
Is this possible?
Thanks in advance for any insight someone might provide.

--
T.J. Mahaffey
[EMAIL PROTECTED]




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to