Guess I got lucky: $select = db_select('node', 'n')->extend('TableSort'); $results = $select->fields('n', array('nid', 'title', 'type', 'created', 'status', 'sticky', 'promote'))->orderByHeader($header)->execute(); Nancy E. Wichmann, PMP Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr. -----Original Message----- From: development-bounces@drupal.org [mailto:development-bounces@drupal.org]On Behalf Of Sascha Grossenbacher Sent: Monday, September 21, 2009 3:41 PM To: development@drupal.org Subject: Re: [development] D7 and Tablesort On Mon, Sep 21, 2009 at 9:15 PM, Will Moy <idealworld@orange.net> wrote:
Berdir's helpful advice already is integrated into the Dynamic Queries page [1] but as you say, feel free to add whatever else you learn :)
I updated the example a bit, because it contained a quite common error. The extend() method does return a new object that needs to be used. See http://drupal.org/node/508796 for more information and an example. Berdir No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.110/2385 - Release Date: 09/21/09 05:51:00