title: fetching data from mysql with jquery
body: <p>I want to fetch some data from mySQL without refreshing the page using jQuery. Can someone please tell me how I can fetch the data if any record in mysql table is updated. For example, following code fetches a number count from the database, if someone add a number in the database and it is updated, how I can display the new number without page refresh? Thanks.</p>
  
  <pre><code>&lt;?
  $query  = "SELECT number, name FROM members WHERE id=1";
  $result = mysql_query($query);
  
  $row = mysql_fetch_array($result);
  $number = $row['number'];    ?&gt;
  </code></pre>