コード例 #1
0
ファイル: Sql.php プロジェクト: jubinpatel/horde
 /**
  * Reads the previously written sync anchors from the database.
  *
  * @param string $databaseURI  URI of database to sync. Like calendar,
  *                             tasks, contacts or notes. May include
  *                             optional parameters:
  *                             tasks?options=ignorecompleted.
  *
  * @return mixed  Two-element array with client anchor and server anchor as
  *                stored in previous writeSyncAnchor() calls. False if no
  *                data found.
  */
 public function readSyncAnchors($databaseURI)
 {
     $database = $this->normalize($databaseURI);
     $r = $this->_db->queryRow('SELECT syncml_clientanchor, syncml_serveranchor ' . 'FROM syncml_anchors WHERE syncml_syncpartner = ' . $this->_db->quote($this->_syncDeviceID, 'text') . ' AND syncml_db = ' . $this->_db->quote($database, 'text') . ' AND syncml_uid = ' . $this->_db->quote($this->_user, 'text'));
     $this->_checkForError($r);
     if (!is_array($r)) {
         return false;
     }
     return array($r[0], $r[1]);
 }