title: update json file dynamically whenever mysql is updated
body: <p>i am going to create a live score board using php and mysql. But i want to create a json file which update automatically whenever i update my table on database. i mean new scores added in tables should be added in my json file. Really confused. sorry for not having any program. hope for some solutions. Thank you. i have some code which i have used to insert in database.</p>
  
  <pre><code> $data = array(
  'name' =&gt; $name,
  'score' =&gt; $score,
  'comment' =&gt; $comment
  );
  
  $result=$this-&gt;db-&gt;insert('score', $data); 
  </code></pre>