cosmicperl has asked for the wisdom of the Perl Monks concerning the following question:
I've got 2 tables, the first has a long list of names with id, the second has some of those id's against another unique id. I want to list off of the names from the first table, but have ones that appear for a set uid listed at the top.SELECT t1.id, t1.name, t2.uid FROM table1 t1 LEFT JOIN table2 t2 ON t1.id = t2.tid AND t2.uid = 22 ORDER BY t2.uid DESC, t1.name
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Getting SQL into DBIC...
by tweetiepooh (Hermit) on Jul 15, 2009 at 11:46 UTC | |
by cosmicperl (Chaplain) on Jul 15, 2009 at 14:54 UTC |