It wasn't code, just an example to get my question across clearly...

I will try the IN, however the manual says "Returns 1 if expr is any of
the values in the IN list" I want to do it for every value. So I'm
trying to accomplish this in one query:

UPDATE users SET status = no WHERE name = bob;
UPDATE users SET status = no WHERE name = fred;
UPDATE users SET status = no WHERE name = pancho;
UPDATE users SET status = no WHERE name = jason;
UPDATE users SET status = no WHERE name = ted;
UPDATE users SET status = no WHERE name = patricia;
UPDATE users SET status = no WHERE name = andrew;
UPDATE users SET status = no WHERE name = jesus;

I'm going to try it now.


On Fri, 2004-01-02 at 11:40, Jeremy March wrote:
> What language are you using?  It's not clear from your example what language 
> you're using (no "$"s, but you also forgot to increment your array so?), so 
> I'll give you an example in PHP:
> 
> $query_string = implode(" OR name = ", $yourarray);
> mysql_query("UPDATE users SET status = no WHERE name = $query_string;");
> 
> _________________________________________________________________
> Take advantage of our limited-time introductory offer for dial-up Internet 
> access. http://join.msn.com/?page=dept/dialup
> 


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

Reply via email to