RE: [PHP-DB] interbase (?) field contents does not show
Beacuse u are using an object structure, Check OOP in PHP, the pointer $variable->name is for objects that why its used in the fetch object and not fetch row fetch row would be $rs["rowname"] or $rs[0]. Check the documentation for more detailed info -Original Message- From: GMansky [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 03, 2001 10:40 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] interbase (?) field contents does not show Meir, Thanks for the response. I believe I tried it with caps but did not get any message. Anyway, I tried it again, and it's now working. Why does $row->LASTNAME give me a result on an ibase_fetch_object() and not on ibase_fetch_row()? Thanks, George -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] interbase (?) field contents does not show
Meir, Thanks for the response. I believe I tried it with caps but did not get any message. Anyway, I tried it again, and it's now working. Why does $row->LASTNAME give me a result on an ibase_fetch_object() and not on ibase_fetch_row()? Thanks, George -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] interbase (?) field contents does not show
On Sunday 29 April 2001 19:00, GMansky wrote: > I followed the documentation on interbase. I have the following code: > > $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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]