예제 #1
0
파일: Setup.php 프로젝트: xingskycn/p2-php
    private function createBlackListTable($tableName)
    {
        $quotedTableName = $this->db->quoteIdentifier($tableName);
        $sql = <<<SQL
CREATE TABLE {$quotedTableName} (
    id     {$this->serialPriamryKey},
    uri    VARCHAR (255),
    size   INTEGER NOT NULL,
    md5    CHAR (32) NOT NULL,
    type   SMALLINT NOT NULL DEFAULT 0
){$this->tableExtraDefs};
SQL;
        return $this->doCreateTable($tableName, $sql);
    }
예제 #2
0
 /**
  * @see DB_common::quoteIdentifier
  */
 public function quoteIdentifier($str)
 {
     $res = $this->db->quoteIdentifier($str);
     $this->assertError($res);
     return $res;
 }