GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   SQL question (https://gfy.com/showthread.php?t=488846)

Zester 07-06-2005 02:40 AM

SQL question
 
what is wrong with this sql?

Code:

update `customers` set payout=100 where id=('234', '34', '102');
what i'm trying to do is set the payout to 100 to customers which ID is either 234, 34 or 102 in the shortest sql possible

WarChild 07-06-2005 02:45 AM

Quote:

Originally Posted by Zester
what is wrong with this sql?

Code:

update `customers` set payout=100 where id=('234', '34', '102');
what i'm trying to do is set the payout to 100 to customers which ID is either 234, 34 or 102 in the shortest sql possible

UPDATE customers
SET payout = '100'
WHERE id IN ('234', '34', '102');


All times are GMT -7. The time now is 02:34 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123