Help Mysql?[+REP] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help Mysql?[+REP] (
/showthread.php?tid=519146)
Help Mysql?[+REP] -
PAF - 13.06.2014
When i start my server connect with msql database the table codes shos under it:
mysql_query("CREATE TABLE IF NOT EXISTS `Bans`(`id` int(10) NOT NULL auto_increment PRIMARY KEY, `Nick` varchar(25) NOT NULL, `UserIP` varchar(30) NOT NULL, `Admin` varchar(25) NOT NULL, `Time` varchar(30) NOT NULL, `Hours` int(10) NOT NULL, `Reason` varchar(12

NOT NULL, `Unix` int(56) NOT NULL default '0')");
The table is create but the table functions not be saved please help me!
Re: Help Mysql?[+REP] -
SilentSoul - 13.06.2014
Quote:
Originally Posted by PAF
The table is create but the table functions not be saved please help me!
|
Mind showing us your codes and how you save them? also the ban command.
Re: Help Mysql?[+REP] -
PAF - 13.06.2014
please tell me what is your skype!
Re: Help Mysql?[+REP] -
PAF - 13.06.2014
format(query, sizeof(query), "INSERT INTO `Bans` (`Nick`, `UserIP`, `Admin`, `Time`, `Reason`, `Unix`) VALUES('%s', '%s', '%s', '%s', '%d/%d/%d %d:%d:%d', '%d', '%d', '%d', '%s', '%d')", receivername, receiverip, sendername, dayss, monthss, yearss, hourss, minutess, secondss, reason, 999999999999999999999999);
Ban CMD
for ban please click here!
Re: Help Mysql?[+REP] -
SilentSoul - 13.06.2014
Sure it won't save because this part specially. '%d/%d/%d %d:%d:%d', bad way to do this. you can easily get the date and time from your data base using the following steps:
now you won't update your query, it will automatically get the date and time of the day.
pawn Код:
format(query, sizeof(query), "INSERT INTO `Bans` (`Nick`, `UserIP`, `Admin`, `Reason`, `Unix`) VALUES('%e', '%s', '%s', '%s', '%d', '%d', '%d', '%s', '%d')", receivername, receiverip, sendername,, reason, 999999999999999999999999);
Try this codes if you still have problems check your mysql.logs and post them here.
Re: Help Mysql?[+REP] -
PAF - 13.06.2014
add me on skype