mysql

xiaoxiao2021-03-06  17

MySQL_FETCH_OBJECT

(PHP 3, PHP 4) mysql_fetch_object - obtain a line from the result set as an object

Description Object

MySQL_FETCH_OBJECT (Resource Result)

Returns the object generated according to the obtained line, if there is no more row, return false.

MySQL_FETCH_OBJECT () and mysql_fetch_array () are similar, only one difference - returns an object rather than an array. Indirect also means accessing arrays by field name instead of offset (number is a legal attribute name).

Note: The field name returned by this function is case sensitive.

field; / * this is invalid * / echo $ row-> 0;?>

On the speed, this function is like mysql_fetch_array (), almost as fast as mysql_fetch_row ().

Example 1. MYSQL_FETCH_Object () example

? user_id; echo $ row-> fullname;} mysql_free_result ($ result);?>

转载请注明原文地址:https://www.9cbs.com/read-41402.html

New Post(0)