PDA

View Full Version : What is wrong with this syntax?


Hex_legend
11-20-2008, 10:33 PM
I am trying to add a table called licences to my "demoforum" db.

The db is called demoforum

I am using this code:



CREATE TABLE IF NOT EXISTS `" . TABLE_PREFIX . `licenses` (
`id` int(6) NOT NULL auto_increment,
`userid` int(6) NOT NULL,
`productid` int(6) NOT NULL,
`licensenum` varchar(250) NOT NULL,
`dateline` varchar(10) NOT NULL,
`status` int(1) NOT NULL,
`url` varchar(250) NOT NULL,
`title` varchar(250) NOT NULL,
`description` text NOT NULL,
`add_urls` text NOT NULL,
`public` int(1) NOT NULL default '0',
`upgrades` text NOT NULL,
PRIMARY KEY (`id`)
)


yet its giving an error all the time. I need this to be able to be run via the vb acp in the query section. Can anyone help with the correct syntax?

Lynne
11-21-2008, 02:20 AM
Check the area where you have TABLE_PREFIX. Your quotes don't add up correctly.

Dismounted
11-21-2008, 07:42 AM
You can't actually run PHP code (you have used TABLE_PREFIX) in the Admin CP SQL Query executer.