[thelist] MYSQL SELECT, UPDATE and INSERT priority

Maximillian Schwanekamp anaxamaxan at neptunewebworks.com
Tue Feb 24 10:58:36 CST 2004


Hi Eduardo,

Sounds to me like your problem is that you're seeing the browser-cached
version of the original form.  If that's the case, here's a no-cache
snippet:
[code]
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");    // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
                                                    // always modified
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");
[/code]

I think this is straight out of the PHP.net docs (I have it stored as a
Dreamweaver snippet).  Just place that in your script somewhere before any
other output to the browser.

Maximillian Von Schwanekamp
Websites for Profitable Microbusiness
NeptuneWebworks.com
voice: 541-302-1438
fax: 208-730-6504


-----Original Message-----
From: eduardobk at via-rs.net [mailto:eduardobk at via-rs.net]
Sent: Tuesday, February 24, 2004 3:34 AM
To: thelist at lists.evolt.org
Subject: [thelist] MYSQL SELECT, UPDATE and INSERT priority
Importance: High


Hi all.Here's the problem I've got with MySQL:1. Click on a record (through
the PHP software I'm developing) to edit it2. Change some fields3. Submit4.
When back to the same record (just submit it to save changes) all fields are
with old values.5. Press F5 and everything is OK with changed saves.I've
found out that UPDATE is occuring after the new SELECT (or SELECT is
occuring before UPDATE) so that the old values are still returned.My first
idea is to use the values from the from and not from the SELECT (database)
after submit. So I'd get the real values.But I'd like to find out some
database side solution since this is not good at all :(Thanks in
advance,Eduardo Bacchi KienetzSenior Support
Analysthttp://www.noticiaslinux.com.br/eduardo/




More information about the thelist mailing list