fix bookmarkExists() for mysqli

git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@639 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
cweiske 2010-02-07 16:51:31 +00:00
parent 3b656954e0
commit 3d135f47e9

View 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;