★ wanayoo — archive 1999 http://www.php.net/manual/function.msql-fetch-object.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to mSQL
Quick Reference
German version of this pageJapanese version of this pageItalian version of this pageFrench version of this pageHungarian version of this page
mSQL
* msql
* msql_affected_rows
* msql_close
* msql_connect
* msql_create_db
* msql_createdb
* msql_data_seek
* msql_dbname
* msql_drop_db
* msql_dropdb
* msql_error
* msql_fetch_array
* msql_fetch_field
* msql_fetch_object
* msql_fetch_row
* msql_fieldname
* msql_field_seek
* msql_fieldtable
* msql_fieldtype
* msql_fieldflags
* msql_fieldlen
* msql_free_result
* msql_freeresult
* msql_list_fields
* msql_listfields
* msql_list_dbs
* msql_listdbs
* msql_list_tables
* msql_listtables
* msql_num_fields
* msql_num_rows
* msql_numfields
* msql_numrows
* msql_pconnect
* msql_query
* msql_regcase
* msql_result
* msql_select_db
* msql_selectdb
* msql_tablename
Manual: msql_fetch_object
View the source code for this pageSearch the site



Previous page
 msql_fetch_field
 Updated
Sat, 12 Aug 2000
msql_fetch_row 
Next page


msql_fetch_object

(PHP3 , PHP4 )

msql_fetch_object -- Fetch row as object

Description

int msql_fetch_object (int query_identifier [, int result_type])

Returns an object with properties that correspond to the fetched row, or false if there are no more rows.

msql_fetch_object() is similar to msql_fetch_array(), with one difference - an object is returned, instead of an array. Indirectly, that means that you can only access the data by the field names, and not by their offsets (numbers are illegal property names).

The optional second argument result_type in msql_fetch_array() is a constant and can take the following values: MSQL_ASSOC, MSQL_NUM, and MSQL_BOTH.

Speed-wise, the function is identical to msql_fetch_array(), and almost as quick as msql_fetch_row() (the difference is insignificant).

See also: msql_fetch_array() and msql_fetch_row().


User Contributed Notes: msql_fetch_object


scentre@one.net.au
23-Jul-2000 09:41
Here is the format for getting something out of an msql_fetch_object.



while($row = msql_fetch_object($Result)) {

echo $row->client_id;

echo $row->password;

}



plus....

$client_id = $row->client_id;

$password = $row->password;



So that you don't have to go through the same bloody problems I did...

And in case I forget...



Brian






scentre@one.net.au
23-Jul-2000 10:06
In addition to the previous format contribution.....

when I loaded it up the 'greater than' sign didn't come out.



So everywhere you see an '-' there should also be a 'greater than' to the right of it, making it look like an arrow to the right. A similsr array arrow as in Perl.



-&gt



Brian.





scentre@one.net.au
23-Jul-2000 10:15
Ok. You talked me into it. let's do it again.

Here is the format for getting something out of an

msql_fetch_object.



while($row = msql_fetch_object($Result)) {

echo $row-&gt client_id;

echo $row-&gt password;

}



plus....

$client_id = $row-&gt client_id;

$password = $row-&gt password;



So that you don't have to go through the same bloody
problems I did...

And in case I forget...



Brian




 About Notes


Previous page
 msql_fetch_field
 Updated
Sat, 12 Aug 2000
msql_fetch_row 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.