I have an install script on my website, and when i run it, it gives me thsi error:
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
active_guests
(ip
varchar(15) collate latin1_general_' at line 2
Here is the code where it seems to bug:
$sql = 'SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
CREATE TABLE `active_guests` (
`ip` varchar(15) collate latin1_general_ci NOT NULL,
`timestamp` int(11) unsigned NOT NULL,
PRIMARY KEY (`ip`)
);';
mysql_query($sql,$con) or die(mysql_error());
$sql = 'CREATE TABLE `active_users` (
`username` varchar(30) collate latin1_general_ci NOT NULL,
`timestamp` int(11) unsigned NOT NULL,
PRIMARY KEY (`username`)
);';
mysql_query($sql,$con) or die(mysql_error());
$sql = 'CREATE TABLE `banned_users` (
`username` varchar(30) collate latin1_general_ci NOT NULL,
`timestamp` int(11) unsigned NOT NULL,
PRIMARY KEY (`username`)
);';
It continues even more after that, but basically it's this. Anyone could clear things up? Thanks in advance!