BREZ Posted August 2, 2012 Share Posted August 2, 2012 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. Quote Link to comment Share on other sites More sharing options...
smoseley Posted August 2, 2012 Share Posted August 2, 2012 "TYPE" is deprecated... try "ENGINE" instead? Quote Link to comment Share on other sites More sharing options...
smoseley Posted August 2, 2012 Share Posted August 2, 2012 Yeah, and no need to default to null... just `pid` int(11) si fine. Quote Link to comment Share on other sites More sharing options...
BREZ Posted August 2, 2012 Author Share Posted August 2, 2012 "TYPE" is deprecated... try "ENGINE" instead? This i dont understand.... I am a novice pensioner learning late 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 Quote Link to comment Share on other sites More sharing options...
Barand Posted August 2, 2012 Share Posted August 2, 2012 this worked CREATE TABLE `form_prior_auth` ( `id` int(11) NOT NULL auto_increment PRIMARY KEY, `pid` int(11), `activity` tinyint(4) NOT NULL default 0, `date` datetime NOT NULL default 0, `prior_auth_number` varchar(35), `comments` varchar(255) ) ENGINE=MyISAM Quote Link to comment Share on other sites More sharing options...
smoseley Posted August 2, 2012 Share Posted August 2, 2012 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 "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? Quote Link to comment Share on other sites More sharing options...
BREZ Posted August 2, 2012 Author Share Posted August 2, 2012 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.