Page 1 of 1

Clearing previous MySQL results

Posted: Sun Jun 29, 2008 12:02 pm
by jefftanner
Hi

I have a script that load a PHP page with data from a MySQL query.

I have modified the MySQL query, but this PHP page still shows the previous results deprecated MySQL query and not the new MySQL results.

I have tried to using the browser's refresh and I have added to the code, but it does not work:

Code: Select all

 
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); 
 
I have tried this with both Mozilla Firefox and Windows IE.

Ideas

Re: Clearing previous MySQL results

Posted: Sun Jun 29, 2008 12:18 pm
by califdon
Check the actual script code as it is on the server carefully to make sure you didn't just neglect to save the updated script or saved it to the wrong directory or something. If the script is really changed, there's no way for it to continue to execute the old (now nonexistent) query.

Re: Clearing previous MySQL results

Posted: Sun Jun 29, 2008 7:39 pm
by Ollie Saunders
If califdon's suggestions yield no fruit (unlikely):
  • Are you connecting to the right database?
  • Are you using transactions or have auto-commit off, in which case you would have to commit your changes to see them in other connection sessions.

Re: Clearing previous MySQL results

Posted: Mon Jun 30, 2008 1:30 pm
by jefftanner
As asked by previous responders:
  • Both the PHP code and SQL code that is called is correct and where they are expected to be.
  • Query is connecting to the correct database
  • Performing a read only operation upon connected database
The only change is the SQL query that is called.

I have to restart browser several times before I see the expected result upon PHP page's viewing area.

Re: Clearing previous MySQL results

Posted: Mon Jun 30, 2008 1:42 pm
by Ollie Saunders
Did you have work offline on?

Re: Clearing previous MySQL results

Posted: Mon Jun 30, 2008 2:30 pm
by califdon
What is the environment you are working in? What editor or web page design software are you using? Is the web server on your local machine or a remote location, such as on the Internet?