• 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.

fro

New Member
Joined
Nov 11, 2010
Messages
123
Reaction score
1
#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 ?
 

SpiderOT

™ツʂριԃҽɾσƚ➽ ٩(•‿•)۶★彡
Joined
Sep 29, 2008
Messages
1,055
Solutions
9
Reaction score
239
Location
Egypt/cairo
Code:
DELETE FROM player_depotitems WHERE itemtype = 2517 AND player_id =
 
Joined
Apr 17, 2008
Messages
1,922
Solutions
1
Reaction score
184
Location
Venezuela
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);
 

Bosphorus

Member
Joined
Oct 15, 2010
Messages
139
Reaction score
12
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)
 

ADMShadow

New Member
Joined
Mar 3, 2011
Messages
23
Reaction score
0
Location
Brazil, Rio de Janeiro :B
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!
 

Znote

<?php echo $title; ?>
Staff member
Global Moderator
Premium User
Joined
Feb 14, 2008
Messages
6,868
Solutions
243
Reaction score
1,706
Location
Norway
GitHub
Znote
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:
 

Mark

Administrator
Staff member
Administrator
Joined
May 27, 2007
Messages
6,390
Solutions
22
Reaction score
1,444
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;
 
Top