Clearing previous MySQL results

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
jefftanner
Forum Newbie
Posts: 7
Joined: Thu May 01, 2008 10:54 am

Clearing previous MySQL results

Post 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
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Clearing previous MySQL results

Post 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.
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Re: Clearing previous MySQL results

Post 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.
jefftanner
Forum Newbie
Posts: 7
Joined: Thu May 01, 2008 10:54 am

Re: Clearing previous MySQL results

Post 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.
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Re: Clearing previous MySQL results

Post by Ollie Saunders »

Did you have work offline on?
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Clearing previous MySQL results

Post 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?
Post Reply