object mysql_fetch_object ( resource $result [, string $class_name [, array $params ]] )
Fetch a result row as an object
Returns an object with properties that correspond to the fetched row and moves the internal data pointer ahead.
<?php
mysql_connect("hostname", "user", "password");
mysql_select_db("mydb");
$result = mysql_query("select * from mytable");
while ($row = mysql_fetch_object($result)) {
echo $row->user_id;
echo $row->fullname;
}
mysql_free_result($result);
?>
5.0.0 Added the ability to return as a different object.
Cum spargi un site cu Havij
0 Comment:
Post a Comment