PDO 類

      (PHP 5 >= 5.1.0, PHP 7, PHP 8, PECL pdo >= 0.1.0)

      簡介

      代表 PHP 和數據庫服務之間的一個連接

      類摘要

      class PDO {
      __construct(
          string $dsn,
          string $username = ?,
          string $password = ?,
          array $driver_options = ?
      )
      commit(): bool
      public errorInfo(): array
      exec(string $statement): int
      getAttribute(int $attribute): mixed
      public static getAvailableDrivers(): array
      lastInsertId(string $name = null): string
      public prepare(string $statement, array $driver_options = array()): PDOStatement
      public query(string $statement): PDOStatement
      public quote(string $string, int $parameter_type = PDO::PARAM_STR): string
      rollBack(): bool
      setAttribute(int $attribute, mixed $value): bool
      }

      目錄