本文整理汇总了PHP中Zotero_DB类的典型用法代码示例。如果您正苦于以下问题:PHP Zotero_DB类的具体用法?PHP Zotero_DB怎么用?PHP Zotero_DB使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Zotero_DB类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getName
public static function getName($charsetOrCharsetID)
{
if (isset(self::$charsets[$charsetOrCharsetID])) {
return self::$charsets[$charsetOrCharsetID];
}
$sql = "(SELECT charset FROM charsets WHERE charsetID=?) UNION\n\t\t\t\t(SELECT charset FROM charsets WHERE charset=?) LIMIT 1";
$charset = Zotero_DB::valueQuery($sql, array($charsetOrCharsetID, $charsetOrCharsetID));
self::$charsets[$charsetOrCharsetID] = $charset;
return $charset;
}
开发者ID:selenus,项目名称:dataserver,代码行数:10,代码来源:CharacterSets.inc.php
示例2: run
public function run($id = null)
{
$this->id = $id;
$this->addr = gethostbyname(gethostname());
if (!Z_CONFIG::$PROCESSORS_ENABLED) {
$sleep = 20;
$this->log("Processors disabled — exiting in {$sleep} seconds");
sleep($sleep);
try {
$this->notifyProcessor("LOCK" . " " . $id);
} catch (Exception $e) {
$this->log($e);
}
return;
}
$this->log("Starting sync processor");
$startTime = microtime(true);
try {
$processed = $this->processFromQueue();
if (Zotero_DB::transactionInProgress()) {
error_log("WARNING: Transaction still in progress after processing!");
}
} catch (Exception $e) {
$this->log($e);
throw $e;
}
$duration = microtime(true) - $startTime;
$error = false;
// Success
if ($processed == 1) {
$this->log("Process completed in " . round($duration, 2) . " seconds");
$signal = "DONE";
} else {
if ($processed == 0) {
$this->log("Exiting with no processes found");
$signal = "NONE";
} else {
if ($processed == -1) {
$this->log("Exiting on lock error");
$signal = "LOCK";
} else {
$this->log("Exiting on error");
$signal = "ERROR";
}
}
}
if ($id) {
try {
$this->notifyProcessor($signal . " " . $id);
} catch (Exception $e) {
$this->log($e);
}
}
}
开发者ID:selenus,项目名称:dataserver,代码行数:54,代码来源:Processor.inc.php
示例3: add
public static function add($userID)
{
Z_Core::debug("Creating publications library for user {$userID}");
Zotero_DB::beginTransaction();
// Use same shard as user library
$shardID = Zotero_Shards::getByUserID($userID);
$libraryID = Zotero_Libraries::add('publications', $shardID);
$sql = "INSERT INTO userPublications (userID, libraryID) VALUES (?, ?)";
Zotero_DB::query($sql, [$userID, $libraryID]);
Zotero_DB::commit();
return $libraryID;
}
开发者ID:selenus,项目名称:dataserver,代码行数:12,代码来源:Publications.inc.php
示例4: getCreatorsWithData
public static function getCreatorsWithData($libraryID, $creator, $sortByItemCountDesc = false)
{
$sql = "SELECT creatorID FROM creators ";
if ($sortByItemCountDesc) {
$sql .= "LEFT JOIN itemCreators USING (creatorID) ";
}
$sql .= "WHERE libraryID=? AND firstName COLLATE utf8_bin = ? " . "AND lastName COLLATE utf8_bin = ? AND fieldMode=?";
if ($sortByItemCountDesc) {
$sql .= " ORDER BY IFNULL(COUNT(*), 0) DESC";
}
$ids = Zotero_DB::columnQuery($sql, array($libraryID, $creator->firstName, $creator->lastName, $creator->fieldMode), Zotero_Shards::getByLibraryID($libraryID));
return $ids;
}
开发者ID:juego11,项目名称:dataserver,代码行数:13,代码来源:Creators.inc.php
示例5: generate
public static function generate()
{
$tries = 5;
while ($tries > 0) {
$str = Zotero_Utilities::randomString(24, 'mixed');
$sql = "SELECT COUNT(*) FROM `keys` WHERE `key`=?";
if (Zotero_DB::valueQuery($sql, $str)) {
$tries--;
continue;
}
return $str;
}
throw new Exception("Unique key could not be generated");
}
开发者ID:robinpaulson,项目名称:dataserver,代码行数:14,代码来源:Keys.inc.php
示例6: loadChildItems
protected function loadChildItems($reload = false)
{
if ($this->loaded['childItems'] && !$reload) {
return;
}
Z_Core::debug("Loading child items for collection {$this->id}");
if (!$this->id) {
trigger_error('$this->id not set', E_USER_ERROR);
}
$sql = "SELECT itemID FROM collectionItems WHERE collectionID=?";
$ids = Zotero_DB::columnQuery($sql, $this->id, Zotero_Shards::getByLibraryID($this->libraryID));
$this->childItems = $ids ? $ids : [];
$this->loaded['childItems'] = true;
$this->clearChanged('childItems');
}
开发者ID:selenus,项目名称:dataserver,代码行数:15,代码来源:Collection.inc.php
示例7: getUserGroupLibraries
public static function getUserGroupLibraries($userID)
{
$sql = "SELECT libraryID FROM groupUsers JOIN groups USING (groupID) WHERE userID=?";
$libraryIDs = Zotero_DB::columnQuery($sql, $userID);
if (!$libraryIDs) {
return array();
}
return $libraryIDs;
}
开发者ID:robinpaulson,项目名称:dataserver,代码行数:9,代码来源:Groups.inc.php
示例8: loadItems
private static function loadItems($libraryID, $itemIDs = array())
{
$shardID = Zotero_Shards::getByLibraryID($libraryID);
$sql = self::getPrimaryDataSQL() . "1";
// TODO: optimize
if ($itemIDs) {
foreach ($itemIDs as $itemID) {
if (!is_int($itemID)) {
throw new Exception("Invalid itemID {$itemID}");
}
}
$sql .= ' AND itemID IN (' . implode(',', array_fill(0, sizeOf($itemIDs), '?')) . ')';
}
$stmt = Zotero_DB::getStatement($sql, "loadItems_" . sizeOf($itemIDs), $shardID);
$itemRows = Zotero_DB::queryFromStatement($stmt, $itemIDs);
$loadedItemIDs = array();
if ($itemRows) {
foreach ($itemRows as $row) {
if ($row['libraryID'] != $libraryID) {
throw new Exception("Item {$itemID} isn't in library {$libraryID}", Z_ERROR_OBJECT_LIBRARY_MISMATCH);
}
$itemID = $row['id'];
$loadedItemIDs[] = $itemID;
// Item isn't loaded -- create new object and stuff in array
if (!isset(self::$objectCache[$itemID])) {
$item = new Zotero_Item();
$item->loadFromRow($row, true);
self::$objectCache[$itemID] = $item;
} else {
self::$objectCache[$itemID]->loadFromRow($row, true);
}
}
}
if (!$itemIDs) {
// If loading all items, remove old items that no longer exist
$ids = array_keys(self::$objectCache);
foreach ($ids as $id) {
if (!in_array($id, $loadedItemIDs)) {
throw new Exception("Unimplemented");
//$this->unload($id);
}
}
}
}
开发者ID:ergo70,项目名称:dataserver,代码行数:44,代码来源:Items.inc.php
示例9: deleteCachedData
/**
* Delete data from memcached
*/
public static function deleteCachedData($libraryID)
{
$shardID = Zotero_Shards::getByLibraryID($libraryID);
// Clear itemID-specific memcache values
$sql = "SELECT itemID FROM items WHERE libraryID=?";
$itemIDs = Zotero_DB::columnQuery($sql, $libraryID, $shardID);
if ($itemIDs) {
$cacheKeys = array("itemCreators", "itemIsDeleted", "itemRelated", "itemUsedFieldIDs", "itemUsedFieldNames");
foreach ($itemIDs as $itemID) {
foreach ($cacheKeys as $key) {
Z_Core::$MC->delete($key . '_' . $itemID);
}
}
}
/*foreach (Zotero_DataObjects::$objectTypes as $type=>$arr) {
$className = "Zotero_" . $arr['plural'];
call_user_func(array($className, "clearPrimaryDataCache"), $libraryID);
}*/
}
开发者ID:ergo70,项目名称:dataserver,代码行数:22,代码来源:Libraries.inc.php
示例10: load
private static function load($libraryID, $ids = [], array $options = [])
{
$loaded = [];
if (!$libraryID) {
throw new Exception("libraryID must be provided");
}
if ($libraryID !== false && !empty(self::$loadedLibraries[$libraryID])) {
return $loaded;
}
$sql = self::getPrimaryDataSQL() . ' AND O.libraryID=?';
$params = [$libraryID];
if ($ids) {
$sql .= ' AND O.' . self::$idColumn . ' IN (' . implode(',', $ids) . ')';
}
$t = microtime();
$rows = Zotero_DB::query($sql, $params, Zotero_Shards::getByLibraryID($libraryID));
foreach ($rows as $row) {
$id = $row['id'];
// Existing object -- reload in place
if (isset(self::$objectCache[$id])) {
self::$objectCache[$id]->loadFromRow($row, true);
$obj = self::$objectCache[$id];
} else {
$class = "Zotero_" . self::$ObjectType;
$obj = new $class();
$obj->loadFromRow($row, true);
if (!$options || !$options->noCache) {
self::registerObject($obj);
}
}
$loaded[$id] = $obj;
}
Z_Core::debug("Loaded " . self::$objectTypePlural . " in " . (microtime() - $t) . "ms");
if (!$ids) {
self::$loadedLibraries[$libraryID] = true;
// If loading all objects, remove cached objects that no longer exist
foreach (self::$objectCache as $obj) {
if ($libraryID !== false && obj . libraryID !== libraryID) {
continue;
}
if (empty($loaded[$obj->id])) {
self::unload($obj->id);
}
}
}
return $loaded;
}
开发者ID:selenus,项目名称:dataserver,代码行数:47,代码来源:DataObjects.inc.php
示例11: array
require 'StatsD.inc.php';
// Use DB read replicas for GET requests
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'GET') {
Zotero_DB::readOnly(true);
}
// Database callbacks
Zotero_DB::addCallback("begin", array("Zotero_Notifier", "begin"));
Zotero_DB::addCallback("commit", array("Zotero_Notifier", "commit"));
Zotero_DB::addCallback("callback", array("Zotero_Notifier", "reset"));
Zotero_NotifierObserver::init();
// Memcached
require 'Memcached.inc.php';
Z_Core::$MC = new Z_MemcachedClientLocal(Z_CONFIG::$SYNC_DOMAIN, array('disabled' => !Z_CONFIG::$MEMCACHED_ENABLED, 'servers' => Z_CONFIG::$MEMCACHED_SERVERS));
Zotero_DB::addCallback("begin", array(Z_Core::$MC, "begin"));
Zotero_DB::addCallback("commit", array(Z_Core::$MC, "commit"));
Zotero_DB::addCallback("reset", array(Z_Core::$MC, "reset"));
//
// Set up AWS service factory
//
$awsConfig = ['region' => !empty(Z_CONFIG::$AWS_REGION) ? Z_CONFIG::$AWS_REGION : 'us-east-1', 'version' => 'latest', 'signature' => 'v4'];
// IAM role authentication
if (empty(Z_CONFIG::$AWS_ACCESS_KEY)) {
// If APC cache is available, use that to cache temporary credentials
if (function_exists('apc_store')) {
$cache = new \Doctrine\Common\Cache\ApcCache();
} else {
$cache = new \Doctrine\Common\Cache\FilesystemCache(Z_ENV_BASE_PATH . 'tmp/cache');
}
$awsConfig['credentials'] = new \Aws\DoctrineCacheAdapter($cache);
} else {
$awsConfig['credentials'] = ['key' => Z_CONFIG::$AWS_ACCESS_KEY, 'secret' => Z_CONFIG::$AWS_SECRET_KEY];
开发者ID:ergo70,项目名称:dataserver,代码行数:31,代码来源:header.inc.php
示例12: updateLastAdded
private static function updateLastAdded($storageFileID)
{
$sql = "UPDATE storageFiles SET lastAdded=NOW() WHERE storageFileID=?";
Zotero_DB::query($sql, $storageFileID);
}
开发者ID:robinpaulson,项目名称:dataserver,代码行数:5,代码来源:S3.inc.php
示例13: loadRelatedItems
private function loadRelatedItems()
{
if (!$this->id) {
return;
}
Z_Core::debug("Loading related items for item {$this->id}");
if ($this->loaded['relatedItems']) {
trigger_error("Related items for item {$this->id} already loaded", E_USER_ERROR);
}
if (!$this->loaded['primaryData']) {
$this->loadPrimaryData(true);
}
// TODO: use a prepared statement
if (!is_numeric($this->id)) {
trigger_error("Invalid itemID '{$this->id}'", E_USER_ERROR);
}
$cacheKey = $this->getCacheKey("itemRelated");
//$ids = Z_Core::$MC->get($cacheKey);
$ids = false;
if ($ids === false) {
$sql = "SELECT linkedItemID FROM itemRelated WHERE itemID=?";
$stmt = Zotero_DB::getStatement($sql, true, Zotero_Shards::getByLibraryID($this->libraryID));
$ids = Zotero_DB::columnQueryFromStatement($stmt, $this->id);
Z_Core::$MC->set($cacheKey, $ids ? $ids : array());
}
$this->relatedItems = $ids ? $ids : array();
$this->loaded['relatedItems'] = true;
}
开发者ID:robinpaulson,项目名称:dataserver,代码行数:28,代码来源:Item.inc.php
示例14: load
private function load()
{
//Z_Core::debug("Loading data for search $this->id");
if (!$this->libraryID) {
throw new Exception("Library ID not set");
}
if (!$this->id && !$this->key) {
throw new Exception("ID or key not set");
}
$shardID = Zotero_Shards::getByLibraryID($this->libraryID);
$sql = "SELECT searchID AS id, searchName AS name, dateAdded, dateModified, libraryID, `key`,\n\t\t\t\tMAX(searchConditionID) AS maxSearchConditionID FROM savedSearches\n\t\t\t\tLEFT JOIN savedSearchConditions USING (searchID) WHERE ";
if ($this->id) {
$sql .= "searchID=?";
$params = $this->id;
} else {
$sql .= "libraryID=? AND `key`=?";
$params = array($this->libraryID, $this->key);
}
$sql .= " GROUP BY searchID";
$data = Zotero_DB::rowQuery($sql, $params, $shardID);
$this->loaded = true;
if (!$data) {
return;
}
foreach ($data as $key => $val) {
$this->{$key} = $val;
}
$sql = "SELECT * FROM savedSearchConditions\n\t\t\t\tWHERE searchID=? ORDER BY searchConditionID";
$conditions = Zotero_DB::query($sql, $this->id, $shardID);
foreach ($conditions as $condition) {
/*
if (!Zotero.SearchConditions.get(condition)){
Zotero.debug("Invalid saved search condition '"
+ condition + "' -- skipping", 2);
continue;
}
*/
$searchConditionID = $condition['searchConditionID'];
$this->conditions[$searchConditionID] = array('id' => $searchConditionID, 'condition' => $condition['condition'], 'mode' => $condition['mode'], 'operator' => $condition['operator'], 'value' => $condition['value'], 'required' => $condition['required']);
}
}
开发者ID:robinpaulson,项目名称:dataserver,代码行数:41,代码来源:Search.inc.php
示例15: end
private function end()
{
if (!$this->responseXML instanceof SimpleXMLElement) {
throw new Exception("Response XML not provided");
}
if ($this->profile) {
Zotero_DB::profileEnd($this->profileShard, false);
}
if ($this->responseCode) {
switch ($this->responseCode) {
case 201:
header("HTTP/1.1 201 Created");
break;
default:
throw new Exception("Unsupported response code");
}
} else {
$updated = (string) $this->responseXML->updated;
if ($updated) {
$updated = strtotime($updated);
$ifModifiedSince = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? $_SERVER['HTTP_IF_MODIFIED_SINCE'] : false;
$ifModifiedSince = strtotime($ifModifiedSince);
if ($ifModifiedSince >= $updated) {
header('HTTP/1.1 304 Not Modified');
exit;
}
$lastModified = substr(date('r', $updated), 0, -5) . "GMT";
header("Last-Modified: {$lastModified}");
}
}
$xmlstr = $this->responseXML->asXML();
$doc = new DOMDocument('1.0');
$doc->loadXML($xmlstr);
$doc->formatOutput = true;
if ($this->queryParams['pprint']) {
$ppdoc = new DOMDocument('1.0');
// Zero-width spaces to push <feed> beyond Firefox's
// feed auto-detection boundary
$comment = $ppdoc->createComment("");
$ppdoc->appendChild($comment);
$ppdoc->formatOutput = true;
$rootElem = $doc->firstChild;
$importedNode = $ppdoc->importNode($rootElem, true);
$ppdoc->appendChild($importedNode);
$doc = $ppdoc;
}
$xmlstr = $doc->saveXML();
if ($this->queryParams['pprint']) {
header("Content-Type: text/xml");
} else {
header("Content-Type: application/atom+xml");
}
echo $xmlstr;
$this->logRequestTime();
echo ob_get_clean();
exit;
}
开发者ID:robinpaulson,项目名称:dataserver,代码行数:57,代码来源:ApiController.php
示例16: addCustomType
public static function addCustomType($name)
{
if (self::getID($name)) {
throw new Exception("Item type '{$name}' already exists");
}
if (!preg_match('/^[a-z][^\\s0-9]+$/', $name)) {
throw new Exception("Invalid item type name '{$name}'");
}
// TODO: make sure user hasn't added too many already
throw new Exception("Unimplemented");
// TODO: add to cache
Zotero_DB::beginTransaction();
$sql = "SELECT NEXT_ID(itemTypeID) FROM itemTypes";
$itemTypeID = Zotero_DB::valueQuery($sql);
$sql = "INSERT INTO itemTypes (?, ?, ?)";
Zotero_DB::query($sql, array($itemTypeID, $name, 1));
Zotero_DB::commit();
return $itemTypeID;
}
开发者ID:juego11,项目名称:dataserver,代码行数:19,代码来源:ItemTypes.inc.php
示例17: getDeletedObjectIDs
private static function getDeletedObjectIDs($userID, $timestamp, $includeAllUserObjects = false)
{
/*
$sql = "SELECT version FROM version WHERE schema='syncdeletelog'";
$syncLogStart = Zotero_DB::valueQuery($sql);
if (!$syncLogStart) {
throw ('Sync log start time not found');
}
*/
/*
// Last sync time is before start of log
if ($lastSyncDate && new Date($syncLogStart * 1000) > $lastSyncDate) {
return -1;
}
*/
// Personal library
$shardID = Zotero_Shards::getByUserID($userID);
$libraryID = Zotero_Users::getLibraryIDFromUserID($userID);
$shardLibraryIDs[$shardID] = array($libraryID);
// Group libraries
if ($includeAllUserObjects) {
$groupIDs = Zotero_Groups::getUserGroups($userID);
if ($groupIDs) {
// Separate groups into shards for querying
foreach ($groupIDs as $groupID) {
$libraryID = Zotero_Groups::getLibraryIDFromGroupID($groupID);
$shardID = Zotero_Shards::getByLibraryID($libraryID);
if (!isset($shardLibraryIDs[$shardID])) {
$shardLibraryIDs[$shardID] = array();
}
$shardLibraryIDs[$shardID][] = $libraryID;
}
}
}
// Send query at each shard
$rows = array();
foreach ($shardLibraryIDs as $shardID => $libraryIDs) {
$sql = "SELECT libraryID, objectType, id, timestamp\n\t\t\t\t\tFROM syncDeleteLogIDs WHERE libraryID IN (" . implode(', ', array_fill(0, sizeOf($libraryIDs), '?')) . ")";
$params = $libraryIDs;
if ($timestamp) {
// Send any entries from before these were being properly sent
if ($timestamp < 1260778500) {
$sql .= " AND (timestamp >= FROM_UNIXTIME(?) OR timestamp BETWEEN 1257968068 AND FROM_UNIXTIME(?))";
$params[] = $timestamp;
$params[] = 1260778500;
} else {
$sql .= " AND timestamp >= FROM_UNIXTIME(?)";
$params[] = $timestamp;
}
}
$sql .= " ORDER BY timestamp";
$shardRows = Zotero_DB::query($sql, $params, $shardID);
if ($shardRows) {
$rows = array_merge($rows, $shardRows);
}
}
if (!$rows) {
return false;
}
$deletedIDs = array('groups' => array());
foreach ($rows as $row) {
$type = $row['objectType'] . 's';
$deletedIDs[$type][] = $row['id'];
}
return $deletedIDs;
}
开发者ID:selenus,项目名称:dataserver,代码行数:66,代码来源:Sync.inc.php
示例18: loadHashes
public static function loadHashes($libraryID)
{
$sql = "SELECT itemID, hash FROM itemNotes JOIN items USING (itemID) WHERE libraryID=?";
$hashes = Zotero_DB::query($sql, $libraryID, Zotero_Shards::getByLibraryID($libraryID));
if (!$hashes) {
return;
}
if (!isset(self::$hashCache[$libraryID])) {
self::$hashCache[$libraryID] = array();
}
foreach ($hashes as $hash) {
if ($hash['hash']) {
self::$hashCache[$libraryID][$hash['itemID']] = $hash['hash'];
}
}
}
开发者ID:robinpaulson,项目名称:dataserver,代码行数:16,代码来源:Notes.inc.php
示例19: keys
public function keys()
{
$userID = $this->objectUserID;
$key = $this->objectName;
$this->allowMethods(['GET', 'POST', 'PUT', 'DELETE']);
if ($this->method == 'GET') {
// Single key
if ($key) {
$keyObj = Zotero_Keys::getByKey($key);
if (!$keyObj) {
$this->e404("Key not found");
}
// /users/<userID>/keys/<keyID> (deprecated)
if ($userID) {
// If we have a userID, make sure it matches
if ($keyObj->userID != $userID) {
$this->e404("Key not found");
}
} else {
if ($this->apiVersion < 3) {
$this->e404();
}
}
if ($this->apiVersion >= 3) {
$json = $keyObj->toJSON();
// If not super-user, don't include name or recent IP addresses
if (!$this->permissions->isSuper()) {
unset($json['dateAdded']);
unset($json['lastUsed']);
unset($json['name']);
unset($json['recentIPs']);
}
header('application/json');
echo Zotero_Utilities::formatJSON($json);
} else {
$this->responseXML = $keyObj->toXML();
// If not super-user, don't include name or recent IP addresses
if (!$this->permissions->isSuper()) {
unset($this->responseXML['dateAdded']);
unset($this->responseXML['lastUsed']);
unset($this->responseXML->name);
unset($this->responseXML->recentIPs);
}
}
} else {
if (!$this->permissions->isSuper()) {
$this->e403();
}
$keyObjs = Zotero_Keys::getUserKeys($userID);
if ($keyObjs) {
if ($this->apiVersion >= 3) {
$json = [];
foreach ($keyObjs as $keyObj) {
$json[] = $keyObj->toJSON();
}
echo Zotero_Utilities::formatJSON($json);
} else {
$xml = new SimpleXMLElement('<keys/>');
$domXML = dom_import_simplexml($xml);
foreach ($keyObjs as $keyObj) {
$keyXML = $keyObj->toXML();
$domKeyXML = dom_import_simplexml($keyXML);
$node = $domXML->ownerDocument->importNode($domKeyXML, true);
$domXML->appendChild($node);
}
$this->responseXML = $xml;
}
}
}
} else {
if ($this->method == 'DELETE') {
if (!$key) {
$this->e400("DELETE requests must end with a key");
}
Zotero_DB::beginTransaction();
$keyObj = Zotero_Keys::getByKey($key);
if (!$keyObj) {
$this->e404("Key '{$key}' does not exist");
}
$keyObj->erase();
Zotero_DB::commit();
header("HTTP/1.1 204 No Content");
exit;
} else {
// Require super-user for modifications
if (!$this->permissions->isSuper()) {
$this->e403();
}
if ($this->method == 'POST') {
if ($key) {
$this->e400("POST requests cannot end with a key (did you mean PUT?)");
}
if ($this->apiVersion >= 3) {
$json = json_decode($this->body, true);
if (!$json) {
$this->e400("{$this->method} data is not valid JSON");
}
if (!empty($json['key'])) {
$this->e400("POST requests cannot contain a key in '" . $this->body . "'");
}
//.........这里部分代码省略.........
开发者ID:kskod,项目名称:dataserver,代码行数:101,代码来源:KeysController.php
示例20: deleteByLibraryMySQL
public static function deleteByLibraryMySQL($libraryID)
{
$sql = "DELETE IFT FROM itemFulltext IFT JOIN items USING (itemID) WHERE libraryID=?";
Zotero_DB::query($sql, $libraryID, Zotero_Shards::getByLibraryID($libraryID));
}
开发者ID:selenus,项目名称:dataserver,代码行数:5,代码来源:FullText.inc.php
注:本文中的Zotero_DB类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论