hi Jontan,
I am not sure whether you have a problem with pagination or sorting or
with merging..
here is an example for merging
$this->Authors->findAll(NULL, 'Author.id, concat(Author.fname, ' ' ,
Author.lname) as name');
for sorting multiple columns
$this->Authors->findAll(NULL, 'Author.id, concat(Author.fname, ' ' ,
Author.lname) as name', array('Author.fname', 'Author.lname'));
Regards,
bingo
On Mar 31, 3:05 pm, "mr_lundis" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> The last day I've bin searching around for a solution to my problem,
> here on the CakePHP group, in the API and the rest of the web (at
> least those pages Google has indexed). But I can't find any solution
> to my problem.
>
> I need to be able to:
> A. Merge a couple of columns in the database by using Concat, or
> B. To be able to sort on multiply columns in the view.
>
> The easiest way to do this would be to merge the data directly in the
> database query, but i can't find any possible way to do this without
> writing my own pagination component, and i wish, if possible, to avoid
> that xD.
>
> The data that i need to merge is an address that in the database is
> spitted in to different fields, of course you can print these in a row
> directly in the view, but then the sorting doesn't work
>
> Thanks.
> Jonatan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---