Gossamer Forum
Home : Products : Gossamer Links : Discussions :

sort order 'if'

Quote Reply
sort order 'if'
I currently sort my links on the field start_date ASC

Now I want to sort them on an 'if' statement:
if start_date eq end_date ASC at the top of the page
followed by start_date ASC for the remaining links.

Any ideas?

Thanks in advance
Quote Reply
Re: [Alba] sort order 'if' In reply to
Not sure if there is an easy way for it.
As I remember the situation is the following:
- The sorting is done within an SQL query, which is part of the core code.

The SELECT SQL syntax has several parts:
Quote:
SELECT [ALL | DISTINCT] select_list
[INTO [new_table_name]]
[FROM {table_name | view_name}[(optimizer_hints)]
[[, {table_name2 | view_name2}[(optimizer_hints)]
[.., {table_name16 | view_name16}[(optimizer_hints)]]]
[WHERE clause]
[GROUP BY clause]
[HAVING clause]
[ORDER BY clause]
[COMPUTE clause]
[FOR BROWSE]
You can only input the ORDER BY part, and you would need to change the WHERE condition.

I should check the core code, to check if it's correct what I wrote above.


Might be possible to create a global which takes the result, and you reorganize according your needs. Maybe Andy or Laura will be able to give you more hints.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...