MySQL Query(or something)
#1

Hi, is there any posible way to do in PAWN. or PHP. To make a huge loop throw MySQL "profiles" tables and find every user that got "test" as "1" and just set it to 0? That means if 1000 users of 100000 has "test" set as 1 Query would set it to 0 for all 1000. Thanks
Reply
#2

pawn Код:
UPDATE profiles SET `Test` = '0'
Reply
#3

How can i make this FOR EVERY user in the MySQL table.
Reply
#4

Quote:
Originally Posted by No Fear
Посмотреть сообщение
How can i make this FOR EVERY user in the MySQL table.
pawn Код:
UPDATE profiles SET `Test` = 0
is already for all users in table, because there's no WHERE clause, if it would be for a single user (example: user ID 0) it would be like
pawn Код:
UPDATE profiles SET `Test` = 0 WHERE `ID` = 0
Reply
#5

Okay, okay, and what if i would like to take "Test" and transfer that "data" to "Test2" for example if player 0 has Test1 = 154, the system would transfer 154 to Test2. And if player 2 has "Test1 = 464, it would transfer that 464 to "Test2", is it hard to make this?
Reply
#6

pawn Код:
UPDATE profiles SET `Test2` = `Test1`, `Test1` = NewValue
I think this is what you want.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)