Session: INSERT -> REPLACE INTO
Brought to you by:
nhruby,
richardarcher
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