SELECT avail_credits from credits where login='$login' limit 1
The above query repeats every 30 seconds.
The first time the query is run, it returns the correct result. After that, the result returned is the same, even though I know for a fact that the value has changed.
So, it appears mysql is caching the query. Hence, I poked around for a way to turn off caching, which turned up:
SELECT SQL_NO_CACHE avail_credits from credits where login='$login' limit 1
Unfortunately, that didn't help.
Specifically, I'm using AJAX to carryout the repeated queries.
Any suggestion on how to solve this problem?