Tuesday, May 26, 2009

complex query for pivot table

hey all,

i have a problem here.There are 2 tables contracts and holders.

[contracts]
-id
-holder_id
-duration
-contract_no
-contract_title
-date_start
-date_end
-created

[holders]
-id
-name

i need to display it in a table order by holder's names.

[holders][no of contracts][average duration][duration <= 155][duration
>= 155]
[7 INC ][ 16 ][ 200 days ]
[ 12 ][ 4 ]

hope everyone could help with awesome idea how to solve it.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: