vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi All, I have this create table statement: CREATE TABLE jos_acajoom_stats_details ( listid int(10) NOT NULL default '0', mailing_id int(11) NOT NULL default '0', subscriber_id int(11) NOT NULL default '0', sentdate datetime NOT NULL default '0000-00-00 00:00:00', html tinyint(1) NOT NULL default '0', read tinyint(1) NOT NULL default '0', UNIQUE KEY listid (listid,mailing_id,subscriber_id) ) TYPE=MyISAM; I get this error message: ERROR 1064 (42000): 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 'read tinyint(1) NOT NULL default '0', UNIQUE KEY listid (listid,mailing_id,sub' at line 7 Can anyone help me with what the issue is? This came from a file that was put out by a MySQLdump, so the file has not been modified...... Thanks! |
| |||
| On 16 Nov 2006 08:12:48 -0800, amerar@iwc.net wrote: > Hi All, > > I have this create table statement: > > CREATE TABLE jos_acajoom_stats_details ( > listid int(10) NOT NULL default '0', > mailing_id int(11) NOT NULL default '0', > subscriber_id int(11) NOT NULL default '0', > sentdate datetime NOT NULL default '0000-00-00 00:00:00', > html tinyint(1) NOT NULL default '0', > read tinyint(1) NOT NULL default '0', > UNIQUE KEY listid (listid,mailing_id,subscriber_id) > ) TYPE=MyISAM; > > > I get this error message: > > ERROR 1064 (42000): 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 'read tinyint(1) NOT NULL default '0', > UNIQUE KEY listid (listid,mailing_id,sub' at line 7 > > Can anyone help me with what the issue is? This came from a file that > was put out by a MySQLdump, so the file has not been modified...... "read" is reserved. Try CREATE TABLE jos_acajoom_stats_details ( listid int(10) NOT NULL default '0', mailing_id int(11) NOT NULL default '0', subscriber_id int(11) NOT NULL default '0', sentdate datetime NOT NULL default '0000-00-00 00:00:00', html tinyint(1) NOT NULL default '0', my_read tinyint(1) NOT NULL default '0', UNIQUE KEY listid (listid,mailing_id,subscriber_id) ) TYPE=MyISAM; -- "The last refuge of the insomniac is a sense of superiority to the sleeping world." --Leonard Cohen, The Favourite Game |
| |||
| On 16 Nov 2006 08:29:50 -0800, amerar@iwc.net wrote: > > Hmmm...found the answer. Looks like the application created some > tables with reserved words. > > STUPID!!! > > Anyhow, I wonder how I can get MySQLdump to back tick the reserved > words...... It's just a text file... s/ read / `read` /g -- I once successfully declined a departmental retreat, saying that on that day I planned instead to advance. -- Alan J. Rosenthal |
| ||||
| "amerar@iwc.net" <amerar@iwc.net> wrote: > > Hmmm...found the answer. Looks like the application created some > tables with reserved words. > > STUPID!!! > > Anyhow, I wonder how I can get MySQLdump to back tick the reserved > words...... mysqldump --quote-names better: read mysqldump --help and pick what suits you XL -- Axel Schwenke, Senior Software Developer, MySQL AB Online User Manual: http://dev.mysql.com/doc/refman/5.0/en/ MySQL User Forums: http://forums.mysql.com/ |