Jump to content

Update table


zujarka99

Recommended Posts

Hello MXC Nation, I'm here to ask some wise man an advice, why when i try to update WHOLE table it isn't working I'm updateing it with a navicat comannd
UPDATE etcitems SET price = 1

And it still not working, any solutions for this ?

Edited by zujarka99
grammar misspelling
Link to comment
Share on other sites

What does "not working" mean? Does it give you error, does it timeout or what? If there's no error at all, try

UPDATE etcitems SET price=1;
SELECT COUNT(*) FROM etcitems WHERE price<>1;

If it returns 0, then it works - maybe you just work in a transaction and need to

COMMIT;

?

Link to comment
Share on other sites

8 minutes ago, eressea said:

What does "not working" mean? Does it give you error, does it timeout or what? If there's no error at all, try

UPDATE etcitems SET price=1;
SELECT COUNT(*) FROM etcitems WHERE price<>1;

If it returns 0, then it works - maybe you just work in a transaction and need to

COMMIT;

?

Solved 3 minutes ago with:
UPDATE etcitem SET price = 0 where price > 1;

Link to comment
Share on other sites

  • SweeTs locked this topic
Guest
This topic is now closed to further replies.


×
×
  • Create New...