⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pdo.constants.html

📁 php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Predefined Constants</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="pdo.resources.html">Resource Types</a></div> <div class="next" style="text-align: right; float: right;"><a href="pdo.connections.html">Connections and Connection management</a></div> <div class="up"><a href="book.pdo.html">PDO</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div> <h1>Predefined Constants</h1> <p class="simpara">The constants below are defined by this extension, andwill only be available when the extension has eitherbeen compiled into PHP or dynamically loaded at runtime.</p> <div class="warning"><b class="warning">Warning</b>  <p class="para">   PDO uses class constants since PHP 5.1. Prior releases use global constants   in the form <b><tt>PDO_PARAM_BOOL</tt></b>.  </p> </div> <dl>  <dt>   <span class="term">    <b><tt>PDO::PARAM_BOOL</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Represents a boolean data type.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::PARAM_NULL</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Represents the SQL NULL data type.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::PARAM_INT</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Represents the SQL INTEGER data type.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::PARAM_STR</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Represents the SQL CHAR, VARCHAR, or other string data type.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::PARAM_LOB</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Represents the SQL large object data type.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::PARAM_STMT</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Represents a recordset type.  Not currently supported by any drivers.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::PARAM_INPUT_OUTPUT</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Specifies that the parameter is an INOUT parameter for a stored     procedure. You must bitwise-OR this value with an explicit     PDO::PARAM_* data type.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::FETCH_LAZY</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Specifies that the fetch method shall return each row as an object with     variable names that correspond to the column names returned in the result     set. PDO::FETCH_LAZY creates the object variable names as they are accessed.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::FETCH_ASSOC</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Specifies that the fetch method shall return each row as an array indexed     by column name as returned in the corresponding result set. If the result     set contains multiple columns with the same name, PDO::FETCH_ASSOC returns     only a single value per column name.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::FETCH_NAMED</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Specifies that the fetch method shall return each row as an array indexed     by column name as returned in the corresponding result set. If the result     set contains multiple columns with the same name, PDO::FETCH_NAMED returns     an array of values per column name.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::FETCH_NUM</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Specifies that the fetch method shall return each row as an array indexed     by column number as returned in the corresponding result set, starting at     column 0.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::FETCH_BOTH</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Specifies that the fetch method shall return each row as an array indexed     by both column name and number as returned in the corresponding result set,     starting at column 0.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::FETCH_OBJ</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Specifies that the fetch method shall return each row as an object with     property names that correspond to the column names returned in the result     set.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::FETCH_BOUND</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Specifies that the fetch method shall return TRUE and assign the values of     the columns in the result set to the PHP variables to which they were     bound with the <a href="pdostatement.bindparam.html" class="function">PDOStatement::bindParam()</a> or     <a href="pdostatement.bindcolumn.html" class="function">PDOStatement::bindColumn()</a> methods.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::FETCH_COLUMN</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Specifies that the fetch method shall return only a single requested     column from the next row in the result set.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::FETCH_CLASS</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Specifies that the fetch method shall return a new instance of the     requested class, mapping the columns to named properties in the class.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::FETCH_INTO</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Specifies that the fetch method shall update an existing instance of the     requested class, mapping the columns to named properties in the class.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::FETCH_FUNC</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::FETCH_GROUP</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::FETCH_UNIQUE</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::FETCH_KEY_PAIR</tt></b>    (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">      Fetch into an array where the 1st column is a key and all subsequent      columns are values    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::FETCH_CLASSTYPE</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::FETCH_SERIALIZE</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     As <b><tt>PDO::FETCH_INTO</tt></b> but object is provided as a serialized string.     Available since PHP 5.1.0.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::FETCH_PROPS_LATE</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Available since PHP 5.2.0    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::ATTR_AUTOCOMMIT</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     If this value is <b><tt>FALSE</tt></b>, PDO attempts to disable autocommit so that the     connection begins a transaction.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::ATTR_PREFETCH</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Setting the prefetch size allows you to balance speed against memory     usage for your application.  Not all database/driver combinations support     setting of the prefetch size.  A larger prefetch size results in     increased performance at the cost of higher memory usage.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::ATTR_TIMEOUT</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Sets the timeout value in seconds for communications with the database.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::ATTR_ERRMODE</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     See the <a href="pdo.error-handling.html" class="link">Errors and error     handling</a> section for more information about this attribute.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::ATTR_SERVER_VERSION</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     This is a read only attribute; it will return information about the     version of the database server to which PDO is connected.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::ATTR_CLIENT_VERSION</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     This is a read only attribute; it will return information about the     version of the client libraries that the PDO driver is using.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::ATTR_SERVER_INFO</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     This is a read only attribute; it will return some meta information about the     database server to which PDO is connected.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::ATTR_CONNECTION_STATUS</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::ATTR_CASE</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Force column names to a specific case specified by the PDO::CASE_*     constants.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::ATTR_CURSOR_NAME</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Get or set the name to use for a cursor.  Most useful when using     scrollable cursors and positioned updates.    </span>   </dd>  </dt>  <dt>   <span class="term">    <b><tt>PDO::ATTR_CURSOR</tt></b>     (<a href="language.types.integer.html" class="type integer">integer</a>)   </span>   <dd>    <span class="simpara">     Selects the cursor type.  PDO currently supports either

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -