DB_DataObject sorting links-results

From: Date: Mon, 13 Jan 2003 23:09:47 +0000
Subject: DB_DataObject sorting links-results
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-3291@lists.php.net to get a copy of this message
i got a question about DataObjects. after getting the linked tables, i would like to have the multiple results sorted by a column how do i do that? what i got now is without sorting
    $contact = new DataObjects_Contact2tree;
    $contact->contactTree_id = $session->temp->folder->id;
    $contact->find();
    while( $contact->fetch() )
    {
// link the column 'contact_id' to the table 'contact' // which contains columns like 'name' 'surname' etc.
        $contact->getLinks();
print_r($contact);
    }
i.e. i want to sort by 'contact.name', is that possible? if so, how? the query would be: SELECT * FROM contact2tree ct,contact c WHERE ct.contact_id=c.id ORDER BY c.name but since i am reading the contact2tree table first, when using the DataObject i have no idea how to sort by the content of a table i will 'link'/'join' later -- Wolfram ... translating template system ... http://sourceforge.net/projects/simpletpl now also as PEAR-package available ... authentication system .... http://sf.net/projects/auth ... and more at .... http://opensource.visionp.de

« previous php.pear.general (#3291) next »