Jump to content

refreshing database


eranwein

Recommended Posts

i have a function that adds a record to a table and then redirects the user to a different page where he should see all of the table's records, including the one that was just added.

the problem is that the second page shows all of the records except the one that was just added.

after a lot of testings, i've tried to manualy refresh the database (mysql-front). after i did that, i've refreshed my page and lost record was found.

is that the way it suppose to be?
if so, is there a function in php that refreshes the database?
Link to comment
Share on other sites

How do you redirect the user to the page that shows the tables records? If you are using a link or a header redirect then the mysql database should show all the data in the table, including new ones.

PHP doesn't have a function that can refresh the database. However MySQL does cache the queries prehaps if you use [a href=\"http://uk2.php.net/manual/en/function.mysql-free-result.php\" target=\"_blank\"]mysql_free_result()[/a] it may solve this.
Link to comment
Share on other sites

I know what you are talking about. It seems like the page is cached and when you go back to it, you see the records that were there the last time you were on the page. I am not sure what it is but I will be looking for it today. Will post when I find out.

Ray
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.