title: query find and then insert if not exist but exist it will update
body: <p>i want find some fields and then create if not exist but if exist it will update. i try this query</p>
  
  <blockquote>
    <p>REPLACE INTO <code>tbl_master_data</code> (<code>part_number</code> ,<code>description</code>, <code>rrp</code>, <code>discount_code</code>, <code>product_group</code>, <code>value_discount</code>, <code>stk</code>) VALUES ('1100000-ax08', 'aas', 45, 'STD', 'ACC',50) WHERE <code>part_number</code>= '1100000-ax08';</p>
  </blockquote>
  
  <p>but something wrong in where clause.
  can tell me how it's work?</p>