Help with MySQL
Hey guys!
I need some help, I have a rank system which is connected to a mysql database. The thing I need help with, is to reset certain coulumns in the mysql table. Lets say for example I have these tables: kills, deaths, rounds. And I want to set the "kills" and "deaths" for everyone who is stored in the database to 0. How can I do this through a plugin? I tried these: PHP Code:
PHP Code:
PHP Code:
I really appreciate some help! |
Re: Help with MySQL
Why not TRUNCATE TABLE?
|
Re: Help with MySQL
PHP Code:
PHP Code:
|
Re: Help with MySQL
You are enclosing the field AND value in quotes, you should only enclose the field; it should be 'Field'=NULL, not 'Field=NULL'. Quotes aren't really needed at all, unless there are spaces in the field, but that's not a good naming practice to begin with.
Code:
UPDATE `rank_system` SET `kills=NULL`,`deaths=NULL`;");Code:
UPDATE `rank_system` SET `kills'=NULL,`deaths'=NULL;"); |
| All times are GMT -4. The time now is 22:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.