ping.php performance: optimizing session_write queries
This commit is contained in:
parent
63e5342ced
commit
747f902e21
1 changed files with 2 additions and 2 deletions
|
@ -40,12 +40,12 @@ function ref_session_write ($id,$data) {
|
||||||
if($session_exists) {
|
if($session_exists) {
|
||||||
$r = q("UPDATE `session`
|
$r = q("UPDATE `session`
|
||||||
SET `data` = '%s'
|
SET `data` = '%s'
|
||||||
WHERE `data` != '%s' AND `sid` = '%s'",
|
WHERE `sid` = '%s' AND `data` != '%s'",
|
||||||
dbesc($data), dbesc($data), dbesc($id));
|
dbesc($data), dbesc($data), dbesc($id));
|
||||||
|
|
||||||
$r = q("UPDATE `session`
|
$r = q("UPDATE `session`
|
||||||
SET `expire` = '%s'
|
SET `expire` = '%s'
|
||||||
WHERE `expire` != '%s' AND `sid` = '%s'",
|
WHERE `sid` = '%s' AND `expire` != '%s'",
|
||||||
dbesc($expire), dbesc($expire), dbesc($id));
|
dbesc($expire), dbesc($expire), dbesc($id));
|
||||||
} else
|
} else
|
||||||
$r = q("INSERT INTO `session`
|
$r = q("INSERT INTO `session`
|
||||||
|
|
Loading…
Reference in a new issue