title: jQuery - Call ajax every 10 seconds
body: <p>I have a mysql feedback database constructed like this:</p>
  
  <blockquote>
    <p>name | location | feedback</p>
    
    <p>Ryan  |  England |    great support</p>
  </blockquote>
  
  <p>Obviously there's more entries than that. I am trying to build a feedback div, where it displays a new feedback item every 10 seconds via ajax.</p>
  
  <p>So I have constructed this:</p>
  
  <pre><code>$(document).ready(function(){
     new get_fb(); 
   });
  
  function get_fb(){
  var feedback = $.ajax({//Ajax
                          type: "POST",
                          url: "feedback.php",
                          async: false
                          }).responseText;//end of ajax
  
  $('div.feedback-box').html(feedback).delay(10000).queue(function() {
      new get_fb(); 
      });
  }
  </code></pre>
  
  <p>And here's my PHP file:</p>
  
  <pre><code>$result = mysql_query("SELECT * FROM feedback ORDER BY RAND() LIMIT 0,1");
  while($row = mysql_fetch_array($result))
  {
      $name = $row['name'];
      $location = $row['location'];
      $feedback = $row['feedback'];
  
      echo "
      &lt;p&gt;Name: $name, Location: $location, Feedback: $feedback.&lt;/p&gt;
      ";
  } 
  </code></pre>
  
  <p>However, this only shows two. It doesn't keep showing new ones, it purely shows the first then the second and stops.</p>
  
  <p>What am I doing wrong? Thanks :)</p>