Saving problem (MySql)
#1

Hi,

I had problem with saving system, and I'm try to add in my database INSTER INTO, etc...
But, I get this error:
PHP код:
--
-- 
Dumping data for table `accounts`
--
INSERT INTO  `accounts` (  `Name` ,  `Password` ,  `IP` ,  `RegStr` ,  `AdminLevel` ,  `VIPLevel` ,  `XP` ,  `Money` ,  `Banked` ,  `Kills` ,  `Deaths` , `Captures` ,  `wBought` ,  `wBought` ,  `Hours` ,  `Minutes` ,  `Seconds` ,  `LastPlayed` ) 
VALUES -- --------------------------------------------------------
--
-- 
Tabelstructuur voor tabel `bans`
--
CREATE TABLE IF NOT EXISTS  `bans` (
 `
BanIDINTNOT NULL ,
 `
NameVARCHAR24 NOT NULL ,
 `
AdminVARCHAR24 NOT NULL ,
 `
ReasonVARCHAR128 NOT NULL ,
 `
IPVARCHAR16 NOT NULL ,
 `
DateVARCHAR32 NOT NULL
ENGINE INNODB DEFAULT CHARSET latin1;
MySQL saysDocumentation
#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 'CREATE TABLE IF NOT EXISTS `bans` (
  
`BanIDint(6NOT NULL,
  `
Namevarcha' at line 20 
Thanks.
Reply
#2

In your first INSERT, you have unclosed VALUES. Either remove that insert, or add some values.
Reply
#3

Your Insert Function is not completed!
INSERT INTO `accounts` ( `Name` , `Password` , `IP` , `RegStr` , `AdminLevel` , `VIPLevel` , `XP` , `Money` , `Banked` , `Kills` , `Deaths` , `Captures` , `wBought` , `wBought` , `Hours` , `Minutes` , `Seconds` , `LastPlayed` ) VALUES ( `Value1`, `Value2`...)

You need to put your values, if not, then this will generate a MySQL Error.
Reply
#4

It wont to work. I get same error.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)