From 2911bf9434cb1a061ff32d41894ee0dd09ed3993 Mon Sep 17 00:00:00 2001 From: Friendika Date: Thu, 13 Oct 2011 01:00:06 -0700 Subject: sql issue item_store --- include/items.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/items.php b/include/items.php index 2c23c6f1b..36851b01f 100644 --- a/include/items.php +++ b/include/items.php @@ -818,14 +818,14 @@ function item_store($arr,$force_parent = false) { // find the item we just created - $r = q("SELECT `id` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1 ORDER BY `id` ASC", + $r = q("SELECT `id` FROM `item` WHERE `uri` = '%s' AND `uid` = %d ORDER BY `id` ASC LIMIT 1", $arr['uri'], // already dbesc'd intval($arr['uid']) ); if(! count($r)) { // This is not good, but perhaps we encountered a rare race/cache condition, so back off and try again. sleep(3); - $r = q("SELECT `id` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1 ORDER BY `id` ASC", + $r = q("SELECT `id` FROM `item` WHERE `uri` = '%s' AND `uid` = %d ORDER BY `id` ASC LIMIT 1", $arr['uri'], // already dbesc'd intval($arr['uid']) ); -- cgit v1.2.3