title: How can refresh MySQL query in every second using ajax or php?
body: <p>I'm new in ajax. I have try to find solution but failed. I want to refresh MySQL query in every second but how? I have no idea how to do it so please help me.</p>
  
  <h2>CODE</h2>
  
  <pre><code>$sql="SELECT * FROM `user`";
  $result = mysql_query($sql);
  
  
  while($row = mysql_fetch_array($result)) {
    echo  $row['fname'];
    echo  $row['email'];
  
  }
  </code></pre>