Help Mysql?[+REP]
#1

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!
Reply
#2

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.
Reply
#3

please tell me what is your skype!
Reply
#4

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!
Reply
#5

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.
Reply
#6

add me on skype
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)