Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Addition within GT:SQL statement

Quote Reply
Addition within GT:SQL statement
Hey guys... Long time... Hope all is well with all the old timers... :)

Quick question for you... Is anything like this possible with the GT module?

$sql_db->select_options ("ORDER BY col_a+col_b DESC");

my $sth = $sql_db->select ( { col_a+col_b > $x && col_a+col_b < $y });

I'm try to select a range of records, greater than $x but less than $y. Clearly this can be done with perl, however I'd much rather let mysql zip through it....

Addition in the ORDER BY statement seems to work fine... I just can for the life me find the answer already in the code somewhere or via Google...

Thanks for your suggestions/help...

AlexJ
Subject Author Views Date
Thread Addition within GT:SQL statement AlexJ 4524 May 22, 2010, 10:15 AM
Thread Re: [AlexJ] Addition within GT:SQL statement
AlexJ 4415 May 22, 2010, 2:00 PM
Thread Re: [AlexJ] Addition within GT:SQL statement
Andy 4391 May 22, 2010, 11:30 PM
Post Re: [Andy] Addition within GT:SQL statement
AlexJ 4327 Jun 3, 2010, 12:10 PM