Jump to content

Brent_GOT

New Members
  • Posts

    3
  • Joined

  • Last visited

Brent_GOT's Achievements

Newbie

Newbie (1/5)

0

Reputation

1

Community Answers

  1. Turns out Ajax was the only way. Got it working properly now. Txs for suggestions.
  2. I'll try that. I'm a little perplexed why php doesn't requery correctly though, I like to understand as I've never encountered this with other languages that use mysql. Do you perhaps know why?
  3. Hi all, I'm very new to php/javascript etc but have made some good headway. I have a php class "functions" which amongst many things has a public function that checks a table in a mysql database for any new "instruction" records. This is triggered from a javascript function every 2 seconds. The entire process is working perfectly. If I have a record in the instruction table it retrieves it perfectly and then deletes it and returns the instruction perfectly. The problem comes in in that it then triggers 2 seconds later and returns the exact same instruction (I do set the instruction variable to '' before retrieving the record and it echos as '' before being set by the retrieved record). It's as if the recordset is cached instead of being refreshed. The same happens if there are no instructions and then I create one in phpadmin, it returns '' (ie the new instruction is not retrieved). I do free the query after each poll etc. The connection is effectively permanent and I'm not getting any errors at all. Does anyone have any ideas on how to rectify this? Ps the deletion in the table is also working perfectly if an instruction is found. There aren't any records remaining either (my basic test process to ensure things are working correctly).
×
×
  • 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.