Hi guis i have a little question
how to conect this to mysql
char szQuery[512];
snprintf(szQuery, sizeof(szQuery), "INSERT INTO player.log_prestige (owner_id, type, name, time, x, y, mapIndex, channel, race) VALUES(%u, '%s', '%s', NOW(), %ld, %ld, %ld, %d, '%s')",
ch->GetPlayerID(), "Prestige I", ch->GetName(), ch->GetX(), ch->GetY(), ch->GetMapIndex(), g_bChannel, set_race);
DBManager::Instance().DirectQuery(szQuery);
what's wrong here?
DROP TABLE IF EXISTS `log_prestige`;
CREATE TABLE `log_prestige` (
`owner_id` int(11) NOT NULL DEFAULT '0',
`name` varchar(24) DEFAULT NULL,
`race` varchar(24) DEFAULT NULL,
`type` varchar(20) DEFAULT NULL,
`time` datetime DEFAULT NULL,
`x` int(11) DEFAULT NULL,
`y` int(11) DEFAULT NULL,
`mapIndex` int(11) DEFAULT NULL,
`channel` varchar(24) DEFAULT NULL,
PRIMARY KEY (`owner_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
When I activate my system crash db ..
Thanks you for help..