Continuously Update mysql query

I have a PHP scrpt that queries a database, and returns the number of records in the query.  The query works.  However, I need to have this number of records updated continuously.  So as other users add records, this counter increases WITHOUT reloading the page.  Any ideas?

I am thinking of something similar to ecommerce sites that as you put a new item in your cart, the counter showing the number of items in the cart increases, even though the page doesn't refresh.

Something similar to what Expert Exchange has for Open Questions and Question History.  The number of open questions is in () next to the Open Question Link.  I want something like that that updates dynamically without refreshing the whole web page.
$query_rs_select = "SELECT * FROM cbacks WHERE assessor_done = 0  AND mid_user = '$user' ";
$rs_select = mysql_query($query_rs_select, $connect_crm) or die(mysql_error());
$row_rs_select = mysql_fetch_assoc($rs_select);
$totalRows_rs_select = mysql_num_rows($rs_select);
 if(!mysql_num_rows($rs_select)) {
$upload = 0;
} else {
$upload = $totalRows_rs_select;
echo $upload;

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

>>WITHOUT reloading the page
I strongly suggest you look at the following ajax tutorial:

so that you can understand the db example:

for your purposes, you will need to send periodic ajax requests

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Use AJAX together with a javascript library like jQuery. You then build a PHP page that simply outputs the number of rows, and do a periodical updater that updates the page every few seconds. It'll look like the page never reloads, and it updates the counter.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.