logo       
Google Custom Search
    AddThis Social Bookmark Button

RE: DataObject::toArray: msg#00467

Subject: RE: DataObject::toArray
> Let me guess... toArray() returns an array ?

Yes, but it returns an array from the object.

Only it seems to do so on predefined variables of the object, not when they
are added dynamically.

>From the doc:

SELECTADD

<?php
$person = new DataObjects_Person;
$person->selectAdd();
$person->selectAdd('id,name');

while ($person->fetch()) {
  echo "$person->id} {$person->name}<BR>";
}


$person = new DataObjects_Person;
$person->selectAdd("DATE_FORMAT(birthday,'%d %m %Y') as birthday_formated
");
$person->id = 12;
$person->find(TRUE);

echo "$person->name} {$person->birthday_formated}<BR>";
?>


TOARRAY

->toArray() -- Get an array of the current result

Only the current result does not seem to include statement from the
selectAdd.

Arnaud.

Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>