help with sql
Guys, im tryin' to repair that bug from my drshop, but im stucked in sql.
In my drshop, names are repeated and it just floods the database. I need to repair this. :|. I need to check if player already exists in my db, and return 0, and update only points :) see bug here http://revo.theupstream.com/DeathrunShop.php |
Re: help with sql
arkshine, joa, anybody?
|
Re: help with sql
Post the code that you are sending to the SQL console.
|
Re: help with sql
PHP Code:
|
Re: help with sql
Quote:
|
Re: help with sql
Quote:
This looks fine. I think that the plugin has problems. |
Re: help with sql
Quote:
yes, but i cant wait two weeks :/ |
Re: help with sql
Quote:
|
Re: help with sql
if you are using mysql server >= v4.1 you can do this with one query.
example how i do in my plugins: create a table with an unique field "name": Code:
CREATE TABLE `something` (`name` VARCHAR(32), `points` INT NOT NULL, PRIMARY KEY(`name`))Code:
|
Re: help with sql
Quote:
Have it check on steamid and update name based on that. (names can be repeated between players, steamids can't). |
| All times are GMT -4. The time now is 15:05. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.