Jump to content

DavidAl

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

DavidAl's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Sorry I'm abusing the MySQL forum. Will mark this as solved and look elsewhere. The "Race condition" opened the door to the real issue here. Thanks a lot.
  2. Thanks for the replies. I see what you mean, but... how does the list() function *wait* until it gets the control variable filled from the insert() function? Sorry I'm pretty new at javascript and AJAX.
  3. 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).
×
×
  • 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.