Help Mysql Table?[+REP]
#1

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')");

This table created but not saving in phpmyadmin help
Reply
#2

Do you ever use an "INSERT" query ?

Because if the table is empty, it's perfectly normal and it means that you've never inserted data inside through "INSERT INTO"
Reply
#3

i inserted
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);
Reply
#5

You have specified 6 fields to fill but you have put 10 values.
Either delete the field specification or delete some values to insert.
Reply
#6

please tell me you skype name!
Reply
#7

No.
Read my signature.
Reply
#8

ok please explain it and correct the codes please then i will replace please
Reply
#9

No.
I'll just explain you your mistake through a very useful link : http://www.w3schools.com/sql/sql_insert.asp

Read the whole documentation and your mistake will be as shining as the moon in a dark night.
Oh and btw, we are not in an SQL help forum. Your problem concerns the SQL language, not the pawn language. Next time, post in an SQL help forum.
Reply
#10

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);

is this code are right and working
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)