/** * Check if creator exists in the database * * @return bool TRUE if the item exists, FALSE if not */ public function exists() { if (!$this->id) { trigger_error('$this->id not set'); } $sql = "SELECT COUNT(*) FROM creators WHERE creatorID=?"; return !!Zotero_DB::valueQuery($sql, $this->id, Zotero_Shards::getShardIDByLibraryID($this->libraryID)); }