Re: DB_DataObject
| From: | Alan Knowles | Date: | Thu, 10 Aug 2006 08:30:03 +0000 |
| Subject: | Re: DB_DataObject | ||
| References: | 1 | Groups: | php.pear.general php.pear.general |
| Request: | Send a blank email to pear-general+get-24871@lists.php.net to get a copy of this message | ||
Noel da Costa wrote:
> Hi,
>
> A query regarding the use of custom ->selectAdd statments with
> DB_DataObject:
>
> If I use this:
> $DO->selectAdd();
> $DO->selectAdd("column1");
>
> I get a dataobject containing a ->column1 property with valid data.
>
>
> However, if I use this:
>
> $DO->selectAdd();
> $DO->selectAdd("column1 AS 'Name'");
Are you sure that SQL is correct - it should be "column1 AS Name"
or
$DB = $DO->getDataBaseConnection();
"column1 AS ". $DB->quoteIdentifiers('Name')
Regards
Alan
>
> The data object that returns contains a ->column1 property which is
> empty and a ->Name property which is also empty.
>
>
> Why? How can I fix? Any ideas?
>
>
> Thanks,
> Noel
>
>
> Noel da Costa
> Lead Developer
> noel.dacosta@magharl.co.uk
>
>
>
>