title: How to only insert/update Json to mysql if status success
body: <p>I want to decode my json data and inserting to mysql table with specific status only. My JSON is:</p>
  
  <pre><code>{"status":"success","message":"Hello","username":"jhon","password":"doe"}
  </code></pre>
  
  <p>And the update conditions is the password recorded on the database different from json object.</p>
  
  <p>But if the json response with status failed, no need to insert to my db. </p>
  
  <p>I am really new on this, is it possible to do this. Some tutorials link will also helpful.</p>
  
  <p>Thanks</p>