Raised This Month: $ Target: $400
 0% 

Help with MySQL


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
andrzN
Senior Member
Join Date: Jan 2010
Location: Bodø / Norway
Old 08-30-2015 , 08:37   Help with MySQL
Reply With Quote #1

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:
SQL_ThreadQuery(g_sql_tuple"qh_IgnoreHandle""UPDATE `rank_system` SET `kills=NULL`,`deaths=NULL`;"); 
PHP Code:
SQL_ThreadQuery(g_sql_tuple"qh_IgnoreHandle""EMPTY FROM `rank_system` WHERE `kills=NULL`,`deaths=NULL`;"); 
PHP Code:
SQL_ThreadQuery(g_sql_tuple"qh_IgnoreHandle""DELETE FROM `rank_system` WHERE `kills=NULL`,`deaths=NULL`;"); 
But it doesnt affect any of the players' score.

I really appreciate some help!
andrzN is offline
Send a message via MSN to andrzN
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode