cvs: phpdoc /en/reference/mysql/functions mysql-fetch-object.xml
| From: | Felipe Pena | Date: | Thu, 27 Dec 2007 02:17:06 +0000 |
| Subject: | cvs: phpdoc /en/reference/mysql/functions mysql-fetch-object.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-864@lists.php.net to get a copy of this message | ||
felipe Thu Dec 27 02:17:06 2007 UTC
Modified files:
/phpdoc/en/reference/mysql/functions mysql-fetch-object.xml
Log:
Changed example for sample of second parameter
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/mysql/functions/mysql-fetch-object.xml?r1=1.17&r2=1.18&diff_format=u
Index: phpdoc/en/reference/mysql/functions/mysql-fetch-object.xml
diff -u phpdoc/en/reference/mysql/functions/mysql-fetch-object.xml:1.17
phpdoc/en/reference/mysql/functions/mysql-fetch-object.xml:1.18
--- phpdoc/en/reference/mysql/functions/mysql-fetch-object.xml:1.17 Wed Jun 20 22:25:00 2007
+++ phpdoc/en/reference/mysql/functions/mysql-fetch-object.xml Thu Dec 27 02:17:06 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.17 $ -->
+<!-- $Revision: 1.18 $ -->
<refentry xml:id="function.mysql-fetch-object" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mysql_fetch_object</refname>
@@ -112,14 +112,16 @@
<programlisting role="php">
<![CDATA[
<?php
+class foo {
+ public $name;
+}
-$row = mysql_fetch_object($result);
-
-/* this is valid */
-echo $row->field;
-/* this is invalid */
-// echo $row->0;
+mysql_connect("hostname", "user", "password");
+mysql_select_db("mydb");
+$result = mysql_query("select name from mytable limit 1");
+$obj = mysql_fetch_object($result, 'foo');
+var_dump($obj);
?>
]]>
</programlisting>