MySQL Forums
Forum List  »  PHP

Re: MYSQL appears to not recache Selected table after Insert
Posted by: Michael Walker
Date: September 14, 2011 04:15AM

Intersting technique, as a separate issue I'll give it a try.
The problem is actually rather subtler than that though.
I have a search page for car tyres. Several <Select>s filled from PHP preloading the page. The Manufacturer select is filled the Type (dependent of Manuf) is not. The Type field is filled when a Manufacturer is selected. This uses javascript and Ajax to get the ready contructed <Select> sectio n for type. Works a treat.
The Search page allows me to create a new record. The page for that shows the same detail as the search page but allows me to create a new type as well. Again through javascript/ajax, the Type field shows just the new type created. The new tyre record will show the newly created type quite correctly.
Return to or reopen the search page, select the same manufacturer and the AJAX query returns the same list as before with no new type. CTRL-F5 doesn't change that. Since I am not refreshing the page or reloading it, HTML techniques aren't going to work. Somewhere in the background, either PHP or MYSQL has cached the query result and isn't updating it, even though the underlying table has changed.
Currently, I'm looking at clearing the $result array in the PHP file that feeds the result back to the AJAX query.

Options: ReplyQuote


Subject
Written By
Posted
Re: MYSQL appears to not recache Selected table after Insert
September 14, 2011 04:15AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.