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

PHP Home Page

Manual Table of Contents
Up to InterBase
Quick Reference
German version of this pageJapanese version of this pageItalian version of this pageFrench version of this pageHungarian version of this page
InterBase
* ibase_connect
* ibase_pconnect
* ibase_close
* ibase_query
* ibase_fetch_row
* ibase_fetch_object
* ibase_free_result
* ibase_prepare
* ibase_execute
* ibase_free_query
* ibase_timefmt
* ibase_num_fields
Manual: ibase_fetch_object
View the source code for this pageSearch the site



Previous page
 ibase_fetch_row
 Updated
Sat, 12 Aug 2000
ibase_free_result 
Next page


ibase_fetch_object

(PHP3 >= 3.0.7, PHP4 >= 4.0RC1)

ibase_fetch_object -- Get an object from a InterBase database

Description

object ibase_fetch_object (int result_id)

Fetches a row as a pseudo-object from a result_id obtained either by ibase_query() or ibase_execute().


<php
    $dbh = ibase_connect ($host, $username, $password);
    $stmt = 'SELECT * FROM tblname';
    $sth = ibase_query ($dbh, $stmt);
    while ($row = ibase_fetch_object ($sth)) {
        print $row->email . "\n";
    }
    ibase_close ($dbh);
?>
      

See also ibase_fetch_row().


User Contributed Notes: ibase_fetch_object


cclljj@i.am
28-Apr-2000 09:59
I use ibase_fetch_object() as this example
but while I print out row->email
it print notthing...?
I also test this method in my own database, it's the same. who can tell me the reason?
and how can I fetc the value in the object data type?



edemorsy@online.fr
14-Jul-2000 10:25
I had the same "empty result" problem, 'til I realized that InterBase stores field names in upper case, so when printing the result of your query you have to use upper case for your properties ( for example here $row->EMAIL )


 About Notes


Previous page
 ibase_fetch_row
 Updated
Sat, 12 Aug 2000
ibase_free_result 
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.