title: UPDATE AND INSERT multiple rows into MySQL database
body: <p>I wrote this code to insert multiple rows into database, and I need to update duplicates . </p>
  
  <pre><code>    INSERT INTO `me_cities`( `from`, `destination`, `price`, `updated`)
   VALUES 
  ('ERR','MRHD','91,000',now()),
  ('ERR','KIH','106,800',now()),
  ('ERR','SYZ','86,000',now()),
  ('ERR','AWZ','121,000',now()),
  ('ERR','IFN','116,741',now()),
  ('ERR','GSM','111,000',now()),
  ('ERR','NJF','141,000',now()),
  ('ERR','IST','351,000',now()),
  ('ERR','BND','116,000',now()),
  ('ERR','DEF','120,200',now()),
  ('ERR','','151,000',now()),
  ('ERR','BUZ','161,000',now()) 
      ON DUPLICATE KEY UPDATE `price`=VALUES(price),`updated`=VALUES(now());
  </code></pre>
  
  <p>But I have error on this query.
  I need to update the row if only <em>from</em> and <em>destination</em> field are as same as next row.</p>