What's wrong with this ?
I have a set of SQL query inside .sql file. and php code to runs it.
PHP code that runs it.
SQL Query
sql Code:
DROP TABLE IF EXISTS `phpdesk_admin`
CREATE TABLE `phpdesk_admin` (
`id` int(255) NOT NULL DEFAULT '0',
`name` varchar(255) NOT NULL DEFAULT '',
`pass` varchar(255) NOT NULL DEFAULT '',
`email` varchar(255) NOT NULL DEFAULT '',
`notify_pm` int(1) NOT NULL DEFAULT '1',
`notify_response` int(1) NOT NULL DEFAULT '1',
`notify_ticket` int(1) NOT NULL DEFAULT '1',
`tppage` int(255) NOT NULL DEFAULT '25',
`signature` mediumtext NOT NULL,
PRIMARY KEY (`id`)
)
It gives me this error.
I copied the query over to phpmyadmin and run it without any problem.
However, this query doesn't looks like there's problem.
sql Code:
DROP TABLE IF EXISTS `phpdesk_admin`
CREATE TABLE `phpdesk_admin` (
`id` int(255) NOT NULL DEFAULT '0',
`name` varchar(255) NOT NULL DEFAULT '',
`pass` varchar(255) NOT NULL DEFAULT '',
`email` varchar(255) NOT NULL DEFAULT '',
`notify_pm` int(1) NOT NULL DEFAULT '1',
`notify_response` int(1) NOT NULL DEFAULT '1',
`notify_ticket` int(1) NOT NULL DEFAULT '1',
`tppage` int(255) NOT NULL DEFAULT '25',
`signature` mediumtext NOT NULL,
PRIMARY KEY (`id`))
It's just one of the query in the sql file. The latter SQL query file works, but it's outdated. Thus, I used another updated SQL file, which is the former. And it doesn't allows me to create.
Any idea?