Link to home
Start Free TrialLog in
Avatar of rgb192
rgb192Flag for United States of America

asked on

how can I modify table structure to make this query run

CREATE TABLE `renters` (
  `id` int(11) NOT NULL auto_increment,
  `first_name` varchar(100) default NULL,
  `last_name` varchar(100) default NULL,
  `email1` varchar(100) default NULL,
  `email2` varchar(100) default NULL,
  `email3` varchar(100) default NULL,
  `phone1` varchar(20) default NULL,
  `phone2` varchar(20) default NULL,
  `phone3` varchar(20) default NULL,
  `information` varchar(4000) default NULL,
  `description` varchar(9000) default NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `email1` (`email1`)
) ENGINE=MyISAM AUTO_INCREMENT=32 DEFAULT CHARSET=utf8$$








INSERT INTO renters (first_name,last_name,email1,email2,email3,phone1,phone2,phone3,information,description) VALUES ('test','','derrickjmiller1@gmail.com','','','','','','','') ON DUPLICATE KEY UPDATE renters set description=concat(description,'somthing to add to description')

Error Code: 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 'set description=concat(description,'somthing to add to description')' at line 1




how can I modify table structure to make this query run

to add to column description in that row where email1 is there
ASKER CERTIFIED SOLUTION
Avatar of johanntagle
johanntagle
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rgb192

ASKER

ON DUPLICATE KEY UPDATE

works

and
my query had too many words

and thanks for the link