• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

PHP [phpMyAdmin] Commands to edit database.

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE itemtype = 2517' at line 1

when using =

DELETE FROM player_depotitems, player_items, tile_items WHERE itemtype = 2517

btw, is there any special command to delete items from a specific character ?
 
Code:
DELETE FROM player_depotitems WHERE itemtype = 2517 AND player_id =
 
Could someone make a database query to make a new sampler?

SQL:
INSERT INTO `players` VALUES (NULL, 'Noob Sampler', 1, 1, 1, 0, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 0, 10, 10, 10, 0, 0);
 
If help anyone.

RESET LEVEL - Reset all players to level 8.
Code:
UPDATE players SET level = 8, health = 185, healthmax = 185, experience = 4200, lookaddons = 0, mana = 35, manamax = 35, manaspent = 0, soul = 0, town_id = 5, posx = 32369, posy = 32241, posz = 7, cap = 470, sex = 0, lastlogin = 0, lastip = 0, skull = 0, skulltime = 0, rank_id = 0, guildnick = '', lastlogout = 0, blessings = 0, balance = 0, stamina = 151200000, loss_experience = 100, loss_mana = 100, loss_skills = 100, loss_containers = 100, loss_items = 100, premend = 0, online = 0, marriage = 0, promotion = 0, deleted = 0, created = 0, hide_char = 0, comment = '', exphist_lastexp = 4200, exphist1 = 0, exphist2 = 0, exphist3 = 0, exphist4 = 0, exphist5 = 0, exphist6 = 0, exphist7 = 0, onlinetimetoday = 0, onlinetime1 = 0, onlinetime2 = 0, onlinetime3 = 0, onlinetime4 = 0, onlinetime5 = 0, onlinetime6 = 0, onlinetime7 = 0, onlinetimeall = 0, auction_balance = 0;

RESET PREMMYDAYS and WARNINGS
Code:
UPDATE accounts SET premdays = 0, warnings = 0;

RESET PLAYERS SKILLS
Code:
UPDATE player_skills SET value = 10, count = 10;

REMOVE MONEY AND QUEST ITENS (GLOBAL) - Depot, Players and Houses - Execute one by one.
Code:
DELETE FROM `player_depotitems` WHERE  `itemtype` IN (2160, 2453, 6528, 8851, 8909, 8908, 8907, 8906, 8905, 2493, 2361, 8888, 8882, 8883, 8881, 2495, 8918, 10021, 6132, 2640, 2494, 2471, 7429, 7434, 7390, 7384, 7389, 7415, 7406, 7380, 7392, 8890, 8928, 8924, 8930, 8854)
DELETE FROM `player_items` WHERE `itemtype` IN (2160, 2453, 6528, 8851, 8909, 8908, 8907, 8906, 8905, 2493, 2361, 8888, 8882, 8883, 8881, 2495, 8918, 10021, 6132, 2640, 2494, 2471, 7429, 7434, 7390, 7384, 7389, 7415, 7406, 7380, 7392, 8890, 8928, 8924, 8930, 8854)
DELETE FROM `tile_items` WHERE `itemtype` IN (2160, 2453, 6528, 8851, 8909, 8908, 8907, 8906, 8905, 2493, 2361, 8888, 8882, 8883, 8881, 2495, 8918, 10021, 6132, 2640, 2494, 2471, 7429, 7434, 7390, 7384, 7389, 7415, 7406, 7380, 7392, 8890, 8928, 8924, 8930, 8854)
 
Someone can help me please?
--
mysql_real_query<> : SELECT `name` , `password` , `salt`, `premdays` , `lastday`, `key`, `warnings`
FROM `accounts` WHERE `id` = 1 LIMIT 1 - MYSQL ERROR : Unknown column 'salt' in 'field list' <1054>
--
I use TFS 0.4 and Mysql!
 
I'm having SQL on school. :p So I made a sample:

Code:
select player_id, count(player_id) as Deaths
from player_deaths
group by player_id
order by count(player_id) desc

This will show a highscore of which player_id (can resemble character) have died the most.

It is a query from the player_deaths table. But how can I use the player_id to fetch the proper character name from the players table??? D:
 
SQL:
SELECT `player_id`, (SELECT `name` FROM `players` WHERE `id` = `player_id`) AS `name`, COUNT(`player_id`) as `Deaths` FROM `player_deaths` GROUP BY `player_id` ORDER BY COUNT(`player_id`) DESC;
 
Back
Top