About the pagination:
http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM
Look at the bottom. The last examples abut binding can be used to let
paginator deal with your habtm.
When it comes to finding related data find is better than read. But
probably find('first') in this case since it
From something,I'm currently working on (I've changed my Models to
yours, but only names)
//paginator variable:
$this-paginate = array('Asset' = array(
'limit' = 10,
'order' = array('Asset.promoted DESC', 'Asset.name ASC'),
'conditions' = array(
I've been scouring the web for a while trying to figure this out. My brain
is fried, so I need some help.
I have a model called Containers, a model called Assets and HABTM table
called AssetsContainer.
So a container can have many assets.
The first question I have is when I'm doing
and not pull all the un-necessary info.
Dave
-Original Message-
From: Alastair [mailto:m...@alastairmoore.com]
Sent: July-07-09 10:31 PM
To: CakePHP
Subject: More HABTM questions - querying data
Robert P kindly solved a problem I was having with updating records
from
related
models and not pull all the un-necessary info.
Dave
-Original Message-
From: Alastair [mailto:m...@alastairmoore.com]
Sent: July-07-09 10:31 PM
To: CakePHP
Subject: More HABTM questions - querying data
Robert P kindly solved a problem I
HABTM questions - querying data
Robert P kindly solved a problem I was having with updating records
in a
HABTM relationship so many thanks to him for that!
I'm now trying to query the data but have added an additional model
to my
system, Regions. So it looks
On Jul 8, 12:43 pm, Robert P shiftyrobs...@gmail.com wrote:
Refactored to remove unnecessary table.
$joins = array(
array(
'table' = 'counties_users',
'alias' = 'CountiesUsers',
'type' = 'INNER',
'conditions' =
Robert P kindly solved a problem I was having with updating records in
a HABTM relationship so many thanks to him for that!
I'm now trying to query the data but have added an additional model to
my system, Regions. So it looks something like:
Members HasAndBelongsToMany County
County BelongsTo
Use contain
There is a chapter in the cookbook how to get only the records from related
models and not pull all the un-necessary info.
Dave
-Original Message-
From: Alastair [mailto:m...@alastairmoore.com]
Sent: July-07-09 10:31 PM
To: CakePHP
Subject: More HABTM questions
-
From: Alastair [mailto:m...@alastairmoore.com]
Sent: July-07-09 10:31 PM
To: CakePHP
Subject: More HABTM questions - querying data
Robert P kindly solved a problem I was having with updating records in a
HABTM relationship so many thanks to him for that!
I'm now trying to query the data
Sorry to beat what is certainly a very uncomfortable horse...
The db is as follows
Users HABTM Groups HABTM Reports (using Group_Users and Group_Reports
tables to manage relationships)
I want to have conditions on both users and reports while returning a
particular report only once. Basically
11 matches
Mail list logo