ibase_fetch_object & ibase_fetch_row

From: Date: Wed, 17 Oct 2001 16:39:32 +0000
Subject: ibase_fetch_object & ibase_fetch_row
Groups: php.general 
Request: Send a blank email to php-general+get-71355@lists.php.net to get a copy of this message
I'm working with php and interbase. I know most of you work with mysql, i have no idea of mysql. My problem: When i try to use ibase_fetch_object, it works fine if there is no fields with the same name from different tables. I mean: $mysql="SELECT NAME,DESCRIPTION FROM PRODUCTS WHERE ID_PRODUCT=$id_product"; $myquery=ibase_query($myconnection,$mysql); $myrow=ibase_fetch_object($myquery); Now i have $myrow->NAME and $myrow->DESCRIPTION. Ok. But if $mysql is a join like this one: $mysql="SELECT P.NAME,P.DESCRIPTION,G.NAME FROM PRODUCTS P INNER JOIN GROUPS G ON P.ID_GROUP=G.ID_GROUP WHERE P.ID_PRODUCT=$id_product"; $myquery=ibase_query($myconnection,$mysql); $myrow=ibase_fetch_object($myquery); When i try to use $myrow->P.NAME it gives me error If i tyr to use $myrow->NAME, i have the first NAME (the one from PRODUCTS), never the second (the one from GROUPS). What can i do?. How can i retrieve GROUPS.NAME from this query?. I'm using ibase_fetch_row, but it is not as clear as ibase_fetch_object. Thanks Salu2, V

« previous php.general (#71355) next »