I’m making a blog script and whenever I update my blog it needs to make a new table for the commenting I’m using this script to do it:
$query .= "CREATE TABLE `$title` (
`guest_id` INT( 4 )
UNSIGNED
ZEROFILL
DEFAULT '0000'
NOT NULL
AUTO_INCREMENT ,
`guest_name`
VARCHAR( 35 )
NOT NULL ,
`guest_message`
TEXT
NOT NULL ,
PRIMARY KEY ( `guest_id` )
)";
, but for some reason it conmes up with an error saying:
Insert Failed!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 $title
( guest_id
INT( 4 ) UNSIGNED ZEROF
Does anyone know whats wrong with it?