On duplicate key update,

Hi, thanks for looking. I’m hoping someone can tell me what stupid thing I’m doing wrong. Here’s the error message:

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 'WHERE `page` = 'alignment' LIMIT 1' at line 19

Here’s the query:

		         INSERT INTO `pages` (
		                  `page`, 
		                  `title`, 
		                  `keywords`, 
		                  `description`, 
		                  `content`
		                  )
		         VALUES 
		                  ('alignment', 
		                  'Satellite dish alignment service', 
		                  'satellite dish alignment costa blanca spain', 
		                  'satellite dish alignment', 
		                  '<h2>SATELLITE DISH ALIGNMENT SERVICE</h2>.....')
		          ON DUPLICATE KEY UPDATE
		                  `title` = 'Satellite dish alignment service',
		                  `keywords` = 'satellite dish alignment costa blanca spain',
		                  `description` = 'satellite dish alignment',
		                  `content` = '<h2>SATELLITE DISH ALIGNMENT SERVICE</h2>.....'
		          WHERE 
		                  `page` = 'alignment'
		          LIMIT 1

And here’s the table:

CREATE TABLE `pages` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `page` varchar(255) NOT NULL,
  `title` varchar(255) DEFAULT NULL,
  `content` text,
  `description` varchar(255) DEFAULT NULL,
  `keywords` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `page` (`page`),
  FULLTEXT KEY `full_index` (`page`,`title`,`content`,`description`,`keywords`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ;

“on duplicate key update” will update the row with the key you specified in the insert. Just eliminate the WHERE and the LIMIT