SA-MP Forums Archive
MySQL database creation - 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: MySQL database creation (/showthread.php?tid=609647)



MySQL database creation - NeXoR - 15.06.2016

Hey guys
I'm working on an Admin mysql based filterscript which I plan to release here
I've done all the Admin registration phase and I wanted to test it but the mysql sent errors in this line:
PHP Code:
(error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ENGINE = InnoDB DEFAULT CHARSET = latin1' at line 1 
So, I tried to debug it and run the command on the database itself using phpMyAdmin
It claims that and I quote:
Code:
"Unrecognized data type: ENGINE"
Like this word doesn't exist in SQL language
Is there a new name ?

SQL Code:
PHP Code:
CREATE TABLE IF NOT EXISTS `Admins` ( "\
     "
`Usernamevarchar(24NOT NULL," \
    "
`AdminLevelint(1NOT NULL," \
     "
`IPvarchar(16NOT NULL," \
      "
`APasswordvarchar(256NOT NULL," \
      "
`ALoginint(1NOT NULL," \
      "
ENGINE InnoDB DEFAULT CHARSET latin1 



Re: MySQL database creation - zPain - 15.06.2016

Remove the comma at the end of the "ALogin" line.

PHP Code:
`ALoginint(1NOT NULL -- No comma here 



Re: MySQL database creation - NeXoR - 15.06.2016

Quote:
Originally Posted by zPain
View Post
Remove the comma at the end of the "ALogin" line.

PHP Code:
`ALoginint(1NOT NULL -- No comma here 
Ugh, those tiny problems which can freak you out ..
Thanks