trying to learn sql queries, help please

Newbie Spellweaver
Joined
Nov 14, 2007
Messages
39
Reaction score
0
i'm trying to make all stackable items stack to 999, and leave weapons and the like alone.

UPDATE `items` If `maxcount`>'1' then SET `maxcount`='999';

that is the query that i tried, it dosen't work, but it makes sense to me. could someone give me a pointer as to why the syntax is wrong?

thanks
 
im not sure but If would be replaced by where i believe.

try if this works
UPDATE `items` where `maxcount`= greater than '1' then SET `maxcount`='999';

c what happens.
 
ALTER is for adding and deleting entire rows.
Try
SELECT maxcount FROM items WHERE maxcount > 1
That'll give you the cells that you need
Maybe you can select them all and put 999
 
Back