Jump to content

[SOLVED] ERROR IN "CREATE TABLE"


d22552000

Recommended Posts

Here is my MYSQL query:

 

mysql_query("CREATE TABLE `phpbb2_auth_access` (
 `group_id` mediumint( NOT NULL default '0',
 `forum_id` smallint(5) unsigned NOT NULL default '0',
 `auth_view` tinyint(1) NOT NULL default '0',
 `auth_read` tinyint(1) NOT NULL default '0',
 `auth_post` tinyint(1) NOT NULL default '0',
 `auth_reply` tinyint(1) NOT NULL default '0',
 `auth_edit` tinyint(1) NOT NULL default '0',
 `auth_delete` tinyint(1) NOT NULL default '0',
 `auth_sticky` tinyint(1) NOT NULL default '0',
 `auth_announce` tinyint(1) NOT NULL default '0',
 `auth_vote` tinyint(1) NOT NULL default '0',
 `auth_pollcreate` tinyint(1) NOT NULL default '0',
 `auth_attachments` tinyint(1) NOT NULL default '0',
 `auth_mod` tinyint(1) NOT NULL default '0',
 KEY `group_id` (`group_id`),
 KEY `forum_id` (`forum_id`)
) 

CREATE TABLE `phpbb2_banlist` (
 `ban_id` mediumint( unsigned NOT NULL auto_increment,
 `ban_userid` mediumint( NOT NULL,
 `ban_ip` char( NOT NULL,
 `ban_email` varchar(255) default NULL,
 PRIMARY KEY  (`ban_id`),
 KEY `ban_ip_user_id` (`ban_ip`,`ban_userid`)
) AUTO_INCREMENT=1 ;

BUNCH OF OTHER SQL") or die(mysql_error()); 

 

Here is what the page tells me:

 

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 `phpbb2_banlist`
( `ban_id` mediumint( unsigned NOT NULL auto_' at line 20

 

Please tell me what the problem is. I am incredibly confused.

 

P.S. The database shows 0 tables after the page is run.

Link to comment
Share on other sites

I did not know that it could only do one query at a time.. which would explain my problem.  and this is PHP mysql because the ENTIRE file is php LOL calling mysql.  It turns out php was my problem.  I have split EVERY insert and EVERY create to its own mysql query, and it works now.  I might run into an erorr soon so I won't press topic solved untill my test run finishes...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.