Jump to content

Creating Table


BREZ

Recommended Posts

Installing db i got this error..

ERROR: query failed: CREATE TABLE `form_prior_auth` ( `id` int(11) NOT NULL auto_increment, `pid` int(11) default NULL, `activity` tinyint(4) NOT NULL default '0', `date` datetime NOT NULL default '0000-00-00 00:00:00', `prior_auth_number` varchar(35) default NULL, `comments` varchar(255) default NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM

 

Error: 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 'TYPE=MyISAM' at line 9

 

So i had my first go ever at creating the table.

#1067 - Invalid default value for 'pid'

 

The only thing in "default" is NULL as the above suggests.

Link to comment
Share on other sites

"TYPE" is deprecated... try "ENGINE" instead?

This i dont understand.... I am a novice pensioner learning late :D

 

anyway, i left the default as NONE.

 

Now this happens..

#1067 - Invalid default value for 'prior_auth_number'

so i changed the default to NONE

Not sure if i should but now.....

#1064 - 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 'id) NOT NULL, PRIMARY KEY (`id`)) ENGINE = MyISAM' at line 1

Link to comment
Share on other sites

Barand got ya.... I'm just gonna add this...

 

"TYPE" is deprecated... try "ENGINE" instead?

This i dont understand.... I am a novice pensioner learning late :D

 

"Deprecated" means that a particular piece of code is marked for removal.  It's highly encouraged never to use deprecated code, because upgrading could break your software.  In the case of MySQL, I believe "TYPE" was deprecated in version 5.1 and support was dropped in version 5.5?

Link to comment
Share on other sites

Yes that installed, except for the single 0 in default showed as invalid.

This is how it now looks (table1)

But according to my Admin cp, db is not installed (cp21)

 

PHP version 5.2.17

MySQL version 5.5.23-55

post-84541-13482403673482_thumb.jpg

post-84541-13482403674235_thumb.jpg

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.