--
-- dump ตาราง `auction_comment`
--
-- --------------------------------------------------------
--
-- โครงสร้างตาราง `characters`
--
CREATE TABLE IF NOT EXISTS `characters` (
`CharId` int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
`CharName` varchar( 32 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL ,
`CharFace` varbinary( 11 ) DEFAULT NULL ,
`UserId` int( 10 ) unsigned NOT NULL DEFAULT '0',
`Cexp` int( 10 ) unsigned NOT NULL DEFAULT '1',
`Jexp` int( 10 ) unsigned NOT NULL DEFAULT '1',
`Job` tinyint( 3 ) unsigned NOT NULL DEFAULT '1',
`Map` tinyint( 3 ) unsigned NOT NULL DEFAULT '11',
`Gender` tinyint( 3 ) unsigned NOT NULL DEFAULT '1',
`HP` mediumint( 8 ) unsigned NOT NULL DEFAULT '200',
`SP` mediumint( 8 ) unsigned NOT NULL DEFAULT '210',
`LP` tinyint( 3 ) unsigned NOT NULL DEFAULT '1',
`LC` tinyint( 3 ) unsigned NOT NULL DEFAULT '45',
`Position.x` float NOT NULL DEFAULT '-17208',
`Position.y` float NOT NULL DEFAULT '9944',
`Position.z` float NOT NULL DEFAULT '109',
`Saveposition.x` float NOT NULL DEFAULT '-6558.26',
`Saveposition.y` float NOT NULL DEFAULT '14842.2',
`Saveposition.z` float NOT NULL DEFAULT '4322.33',
`Saveposition.map` tinyint( 3 ) unsigned NOT NULL DEFAULT '3',
`Stats.Str` tinyint( 3 ) unsigned NOT NULL DEFAULT '0',
`Stats.Dex` tinyint( 3 ) unsigned NOT NULL DEFAULT '0',
`Stats.Int` tinyint( 3 ) unsigned NOT NULL DEFAULT '0',
`Stats.Con` tinyint( 3 ) unsigned NOT NULL DEFAULT '0',
`Stats.Luc` tinyint( 3 ) unsigned NOT NULL DEFAULT '0',
`Stats.Pending` tinyint( 3 ) unsigned NOT NULL DEFAULT '0',
`Rufi` int( 10 ) unsigned NOT NULL DEFAULT '0',
`UppercasedCharName` varchar( 32 ) DEFAULT NULL ,
PRIMARY KEY ( `CharId` , `UserId` ) USING BTREE
) ENGINE = MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT =1;
MySQL แสดง: เอกสารอ้างอิง
#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 'USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1' at line 30
2.ผิดพลาด
คำค้น SQL: เอกสารอ้างอิง
Code (SQL)
DELIMITER $$ CREATE PROCEDURE `list_availablepersonalrequests` ( CharacterId int, regionid int, clvl int, jlvl int, qid int ) BEGIN SELECT `list_quests`.`QuestId` , `list_quests`.`NPC`
FROM `list_quests`
WHERE `list_quests`.`QuestId` != qid
AND `list_quests`.`QuestType` =2
AND `list_quests`.`Req_Clvl` <= clvl
AND `list_quests`.`Req_Jlvl` <= jlvl
AND `list_quests`.`NPC` >0
AND `list_quests`.`QuestId` NOT
IN (
SELECT `list_questhistory`.`QuestId`
FROM `list_questhistory`
WHERE `list_questhistory`.`CharId` = CharacterId
)
AND (
`list_quests`.`Req_Quest` = '0'
OR `list_quests`.`Req_Quest`
IN (
SELECT `list_questhistory`.`QuestId`
FROM `list_questhistory`
WHERE `list_questhistory`.`CharId` = CharacterId
))
GROUP BY `list_quests`.`NPC`
LIMIT 50 ;
MySQL แสดง: เอกสารอ้างอิง
#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 'DELIMITER $$
CREATE PROCEDURE `list_availablepersonalrequests`(CharacterId in' at line 1
ขอบคุณล่วงหน้านะครับ.....
Tag : PHP, MySQL, Ms SQL Server 2005, Ms SQL Server 2008, Ms SQL Server 2012