]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
fix bookmarkExists() for mysqli
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Sun, 7 Feb 2010 16:51:31 +0000 (16:51 +0000)
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Sun, 7 Feb 2010 16:51:31 +0000 (16:51 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@639 b3834d28-1941-0410-a4f8-b48e95affb8f

src/SemanticScuttle/Service/Bookmark.php

index cb53cb1ea7a89a0fe115c04c05d376b0e1666c7b..81752c23079981e3b87fac39685741c62e3faa29 100644 (file)
@@ -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;