Re: interbase (?) field contents does not show
| From: | Meir kriheli | Date: | Sun, 29 Apr 2001 21:48:17 +0000 |
| Subject: | Re: interbase (?) field contents does not show | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-8973@lists.php.net to get a copy of this message | ||
On Sunday 29 April 2001 19:00, GMansky wrote:
> I followed the documentation on interbase. I have the following code:
>
> <?php
> $rowcount = 0; $dbh = ibase_connect ($host, $username, $password);
> $stmt = 'SELECT * FROM contact';
> $sth = ibase_query ($dbh, $stmt);
> while ($row = ibase_fetch_object ($sth)) {
> print $row->lastname . "\n"; $rowcount = $rowcount+1;
> }
> echo $rowcount; ibase_close ($dbh);
> ?>
> $rowcount gave me the correct number of rows but referenceto any field name
> does not show anything. I tried uppercaseand it still does not show
> anything. Anything that I am missing?
> Thanks in advance,
> George
Hi George
Try using uppercase, ibase_fetch_object will return fields as uppercase.
So:
print $row->LASTNAME;
You can see this info in the user contributed notes in the on line manual.
goto:
http://www.php.net/manual/en/function.ibase-fetch-object.php
--
Meir Kriheli
There's someone in my head, but it's not me - Pink Floyd