From 3d135f47e954e6db437ac2fe9141b1f52e8ba40c Mon Sep 17 00:00:00 2001 From: cweiske Date: Sun, 7 Feb 2010 16:51:31 +0000 Subject: fix bookmarkExists() for mysqli git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@639 b3834d28-1941-0410-a4f8-b48e95affb8f --- src/SemanticScuttle/Service/Bookmark.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/SemanticScuttle/Service') diff --git a/src/SemanticScuttle/Service/Bookmark.php b/src/SemanticScuttle/Service/Bookmark.php index cb53cb1..81752c2 100644 --- a/src/SemanticScuttle/Service/Bookmark.php +++ b/src/SemanticScuttle/Service/Bookmark.php @@ -322,11 +322,15 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService $crit['uId'] = $uid; } - $sql = 'SELECT COUNT(*) FROM '. $GLOBALS['tableprefix'] .'bookmarks WHERE '. $this->db->sql_build_array('SELECT', $crit); - if (!($dbresult = & $this->db->sql_query($sql))) { - message_die(GENERAL_ERROR, 'Could not get vars', '', __LINE__, __FILE__, $sql, $this->db); + $sql = 'SELECT COUNT(*) as "0" FROM '. $GLOBALS['tableprefix'] .'bookmarks WHERE '. $this->db->sql_build_array('SELECT', $crit); + + if (!($dbresult = $this->db->sql_query($sql))) { + message_die( + GENERAL_ERROR, 'Could not get vars', '', + __LINE__, __FILE__, $sql, $this->db + ); } - if($this->db->sql_fetchfield(0, 0) > 0) { + if ($this->db->sql_fetchfield(0, 0) > 0) { $output = true; } else { $output = false; -- cgit v1.2.3