Jump to content

[SOLVED] SELECT not showing previous INSERT


DavidAl

Recommended Posts

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).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.