i am using thie jquery code to poll my database:
jQuery(function($){
setInterval(function(){
$.get( 'getrows.php', function(newRowCount){
$('#rowcounter').html( newRowCount );
});
},5000); // 5000ms == 5 seconds
});
and display the results here:
<p>There are <span id='rowcounter'>xx</span> rows in the DB.</p>
but i am not sure what to put in the getrows.php
file... does there need to be any html tags with an ID of rowcounter
or newRowCount
?