CREATE TABLE `pvp_ranking` (
`char_id` int(11) unsigned NOT NULL auto_increment,
`kill_point` int(11) NOT NULL,
`die_point` int(11) NOT NULL,
PRIMARY KEY (`char_id`)
) ENGINE=MyISAM AUTO_INCREMENT=150007 ;
INSERT INTO `pvp_ranking` VALUES (150006, 0, 1);
INSERT INTO `pvp_ranking` VALUES (150000, 1, 15);
but i want to show ranking like
mes "[ Char Name ] Kill : xx points | Die : xx points | Total Kill - Die";
but i cant select name i try with
if ( query_sql( "SELECT `name`, `kill_point` FROM `pvp_ranking` JOIN `char` ON `pvp_ranking`.`char_id` = `char`.`char_id` WHERE `kill_point` ORDER BY `point` DESC LIMIT 10;", .@name$, .@kill_point ) )
it's work but
if ( query_sql( "SELECT `name`, `kill_point`-`die_point` FROM `pvp_ranking` JOIN `char` ON `pvp_ranking`.`char_id` = `char`.`char_id` WHERE `kill_point`-`die_point` ORDER BY `kill_point`-`die_point` DESC LIMIT 10;", .@name$, .@point ) )
it doesn't work i have this error
(23:36:29) SQL: DB error - Column 'die_point' in field list is ambiguous
(23:36:29) Debug: at trunk\src\map\script.c:13703 - SELECT `name`,`kill_point`,`die_point` FROM `pvp_ranking` JOIN `char` ON `pvp_ranking`.`char_id` = `char`.`char_id` WHERE `kill_point`-`die_point` ORDER BY `kill_point`-`die_point` DESC LIMIT 10;
(23:36:29) Debug: Source (NPC): rankmaster at morocc (136,111)
Question
XenaNyx
i create my pvp_ranking
but i want to show ranking like
mes "[ Char Name ] Kill : xx points | Die : xx points | Total Kill - Die";
but i cant select name i try with
it's work but
it doesn't work i have this error
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.