From 747f902e21f7ddf9e94ede295fe3c12c3ade2eb1 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 28 Oct 2016 05:55:19 -0400 Subject: [PATCH] ping.php performance: optimizing session_write queries --- include/session.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/session.php b/include/session.php index 8f9d64606c..4e7befb1b5 100644 --- a/include/session.php +++ b/include/session.php @@ -40,12 +40,12 @@ function ref_session_write ($id,$data) { if($session_exists) { $r = q("UPDATE `session` SET `data` = '%s' - WHERE `data` != '%s' AND `sid` = '%s'", + WHERE `sid` = '%s' AND `data` != '%s'", dbesc($data), dbesc($data), dbesc($id)); $r = q("UPDATE `session` SET `expire` = '%s' - WHERE `expire` != '%s' AND `sid` = '%s'", + WHERE `sid` = '%s' AND `expire` != '%s'", dbesc($expire), dbesc($expire), dbesc($id)); } else $r = q("INSERT INTO `session` -- 2.39.5