Re: using ADODB db class

From: Date: Tue, 10 Jul 2001 16:47:04 +0000
Subject: Re: using ADODB db class
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-10218@lists.php.net to get a copy of this message
Hi Mark, You can access the column by index position instead, or use as column alias: "select a.col col1, b.col col2 from a,b where a.key = b.key" Then access using col1 and col2. Bye, John "Mark Newnham" <mnewnham@adacorp.com> wrote in message news:95DE24D1FCFED0118B910060940A3340413FBF@mailhub.adacorp.com... > Not sure if this is really the right list to ask on, so please excuse me. > > I am trying to use the adodb db class with php4/mysql. On problem i have hit > is that if i retrieve 2 tables with a join and the 2 tables both have a > field of the same name, the command > > $result->fields("fieldname") always returns the value of the second field of > that name. > > i could loop through the fields via index, then use fetchfield() to retrieve > the name, but generically, I would also like to retrieve the table that the > field is attached to. Does anyone know of a way to do this or a command that > has this option? > > Thanks > > Mark

« previous php.db (#10218) next »