On Lunes, 15 de Junio de 2009 14:03:34 [email protected] escribió:
> Hi,
>
> I work with MySql Cluster to have a high availability...
> MySQL cluster has some constraints, like to always use the primary key
> in the clause ORDER BY.
Do you get some error when you don't include id? I haven't used mysql cluster,
but I have seen examples without primary key in order by clause, and I can't
find it in the documentation.
>
> Example :
> If I have a table messages like :
> - id integer autoincrement primary key
> - created_at datetime
> - updated_at datetime
> - tile string
> - content blod
>
> The requests must always be like that :
>
> - SELECT * FROM messages ORDER BY id
> or
> - SELECT * FROM messages ORDER BY updated_at, id
> or
> - SELECT * FROM messages WHEN title like 'A%' ORDER BY title, id
>
> Always the ID ;-))
>
> How it's possible to implemente this with AS ?
> the option Config.list.sorting = { :id => :asc } works only the first
> time.
>
> If I click on the title column or updated_at column, how to include
> too the ID column..
>
> I looked columns[:updated_at].sort_by , but nothing on multiple
> columns sorting..
>
> Thanks for your help
>
> Vincent
>
--
Sergio Cambra .:: entreCables S.L. ::.
Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [email protected]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---