Menu

#11 Session: INSERT -> REPLACE INTO

open
nobody
None
5
2001-10-03
2001-10-03
No

Hi,

here's another trivial patch - sometimes there are
duplicate session IDs (i had two in two days) and the
first is long invalid (not used any more). So instead
of having a SQL error lets just replace the session -
it's a hack, but for me it has produced no error in
almost a year (well, since phplib 7.2 was released ;)

It's trivial, just change the "insert into" in the
ac_store function (in session.inc) to "replace into":

---------------------------------------------------
$iquery = sprintf("replace into %s ( sid, name, val,
changed ) values ('%s', '%s', '%s', '%s')",
---------------------------------------------------

-- Jens

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.