Re: mysql problem- I know it isn't strictly php
| From: | Ethilien | Date: | Wed, 20 Jul 2005 19:29:34 +0000 |
| Subject: | Re: mysql problem- I know it isn't strictly php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-219067@lists.php.net to get a copy of this message | ||
That last line always causes me problems, I think it is probably a difference in versions of mysql. Just change the last line to:
);
without any of the text in their. It doesn't really do much anyway.
Ross wrote:
Hi all, I am trying to create a table on the remote server but it never seems to work CREATE TABLEsheet1(idint(10) NOT NULL auto_increment,titlevarchar(255) NOT NULL default '',fnamevarchar(255) NOT NULL default '',snamevarchar(255) default NULL,job_titlevarchar(255) default NULL,organisationvarchar(255) default NULL,streetvarchar(255) default NULL,cityvarchar(255) default NULL,postcodevarchar(255) default NULL,office_telvarchar(255) default NULL,mobilevarchar(255) default NULL,faxvarchar(255) default NULL,webvarchar(255) default NULL,add_infovarchar(255) default NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=303 ; There seems to be a problem with the last line (this is exported from my local server). I am just learning about mySql as I go so have no real clue about CHARSET and ENGINE (which I believe may be the problem) This is the error 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 'DEFAULT CHARSET=latin1 AUTO_INCREMENT=303' at line 18 and this is what the manual says (not very helpful) a.. Error: 1064 SQLSTATE: 42000 (ER_PARSE_ERROR) Message: %s near '%s' at line %d Any help will be appreciated. R.