pdostatement.fetchobject.html
来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 100 行
HTML
100 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Fetches the next row and returns it as an object.</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="pdostatement.fetchcolumn.html">PDOStatement->fetchColumn</a></div> <div class="next" style="text-align: right; float: right;"><a href="pdostatement.getattribute.html">PDOStatement->getAttribute</a></div> <div class="up"><a href="class.pdostatement.html">PDOStatement</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="pdostatement.fetchobject" class="refentry"> <div class="refnamediv"> <h1 class="refname">PDOStatement->fetchObject</h1> <p class="verinfo">(No version information available, might be only in CVS)</p><p class="refpurpose"><span class="refname">PDOStatement->fetchObject</span> — <span class="dc-title">Fetches the next row and returns it as an object.</span></p> </div> <div class="refsect1 description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <span class="methodname"><b><b>PDOStatement::fetchObject</b></b></span> ([ <span class="methodparam"><span class="type">string</span> <tt class="parameter">$class_name</tt></span> [, <span class="methodparam"><span class="type">array</span> <tt class="parameter">$ctor_args</tt></span> ]] )</div> <p class="para rdfs-comment"> Fetches the next row and returns it as an object. This function is an alternative to <a href="pdostatement.fetch.html" class="function">PDOStatement::fetch()</a> with <b><tt>PDO::FETCH_CLASS</tt></b> or <b><tt>PDO::FETCH_OBJ</tt></b> style. </p> </div> <div class="refsect1 parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><i><tt class="parameter">class_name</tt></i></span> <dd> <p class="para"> Name of the created class, defaults to <i>stdClass</i>. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">ctor_args</tt></i></span> <dd> <p class="para"> Elements of this array are passed to the constructor. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns an instance of the required class with property names that correspond to the column names or <b><tt>FALSE</tt></b> in case of an error. </p> </div> <div class="refsect1 seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"><a href="pdostatement.fetch.html" class="function" rel="rdfs-seeAlso">PDOStatement::fetch()</a></li> </ul> </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="pdostatement.fetchcolumn.html">PDOStatement->fetchColumn</a></div> <div class="next" style="text-align: right; float: right;"><a href="pdostatement.getattribute.html">PDOStatement->getAttribute</a></div> <div class="up"><a href="class.pdostatement.html">PDOStatement</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?