Click to See Complete Forum and Search --> : crazy ass mysql/php problem


Daot Lagorille
09-19-2003, 12:45 PM
Help help.

I am running mysql off my xp machine, and for some reason, I am having a wierd problem that started today, for no apparent reason - I had not changed any settings.

Basiclly, I have a page that has a form that will call a mysql update function. When it is sctivated, the page still displays the old information, not the updated stuff, although, when I check the contents of the database in phpmyadmin, everything is updated as it should be.

So the new content in the database is not being displayed on the php front end, only the old un-updated stuff.

When I restart my machine, the front end only then will display the updated records. I don't think this is a browser refresh problem, as I do refresh the browser, close it, whatever. And plus, the php page reads directly from the database.

Help help.

pyro
09-19-2003, 12:50 PM
It sounds like a browser refresh problem to me. Try adding some no-cache headers to the page, and see if that helps.

<meta http-equiv="cache-control" content="no-cache, must-revalidate">
<meta http-equiv="pragma" content="nocache">

Daot Lagorille
09-19-2003, 12:57 PM
no dice.

Thanks for the speedy reply, though!

AdamGundry
09-19-2003, 02:26 PM
I've had a similar problem before, which I think was down to writing the wrong variables to the page. If you could post a link to your script, we might be able to help.

Adam

Daot Lagorille
09-19-2003, 02:37 PM
Firstly, major thanks for your willingness to help.

I have discovered the problem, however.

The problem is


*drumroll*


*continued drumroll*

Me. What a lameass I am. My sql statement selected from two table which each have a unique, primary key field called "keyid". Of course, they have different numbers there.. and things got majorly f*ckered.

Anyway, to punish myself, I have cut off one of my pinkies with garden shears. I feel much better now, thank you.

spykemitchell
09-20-2003, 06:14 AM
I had the same problem for ages and it was all down to refreshing the browser cache....

Quite an obvious thing but it took me a while to find out what had gone wrong....