Hello, I have a problem with a SELECT that *sometimes* doesn't show the row from a previous INSERT. It fails around 1 call of every 10.
The structure I have is the following:
1) HTML button: calls the javascript function insertAndList().
2) insertAndList(): calls the javascript function insert() which through AJAX executes a PHP that inserts a row in a MySQL databas.
3) inserAndList(): calls the javascript function list() which through AJAX executes a PHP that lists the table.
If I add a delay of 100ms between 2) and 3), the list() function fails much less often, around 1 of every 100.
Is there a way to force the SELECT to "refresh" the buffer or whatever it is that is showing the old number of rows? (i'm not using MySQL CACHE, as far as I know).