# PHP+MySQL Create table problem

**URL:** <https://forum.kirupa.com/t/php-mysql-create-table-problem/95770>\
**Category:** Uncategorized\
**Created:** [November 30, 2003, 3:25pm UTC](https://forum.kirupa.com/t/php-mysql-create-table-problem/95770 "2003-11-30T15:25:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![superman\_ii](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@superman\_ii](https://forum.kirupa.com/u/superman_ii)\
**Post date:** [November 30, 2003, 3:25pm UTC](https://forum.kirupa.com/t/php-mysql-create-table-problem/95770/1 "2003-11-30T15:25:57Z")

</div>

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:

```php

$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?
