techlinks
10-20-07, 09:35 PM
Hello Folks:
OK, so I'm new to SQL but can't for the life of me find the syntax error in the following SQL statement. Can someone point to where I've messed up? It is:
UPDATE homenews SET subject = 'aaaa', description = ' bbb ', active = 'no', lastmodified = '2007-10-20' WHERE index = 101
MySQL keeps failing to execute; saying my SQL statement is invalid. The table definition is as follows:
CREATE TABLE `homenews` (
`index` int(3) NOT NULL auto_increment,
`subject` varchar(20) NOT NULL,
`description` varchar(20) NOT NULL,
`image` varchar(20) NOT NULL,
`lastmodified` date NOT NULL,
`active` varchar(3) NOT NULL,
PRIMARY KEY (`index`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=102 ;
Thanks in advance everyone.
Lester
OK, so I'm new to SQL but can't for the life of me find the syntax error in the following SQL statement. Can someone point to where I've messed up? It is:
UPDATE homenews SET subject = 'aaaa', description = ' bbb ', active = 'no', lastmodified = '2007-10-20' WHERE index = 101
MySQL keeps failing to execute; saying my SQL statement is invalid. The table definition is as follows:
CREATE TABLE `homenews` (
`index` int(3) NOT NULL auto_increment,
`subject` varchar(20) NOT NULL,
`description` varchar(20) NOT NULL,
`image` varchar(20) NOT NULL,
`lastmodified` date NOT NULL,
`active` varchar(3) NOT NULL,
PRIMARY KEY (`index`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=102 ;
Thanks in advance everyone.
Lester