1 answer
0 votes
Complex find condition query encapsulating values in single quotes
Hi,
I'm moving a mysql query from 1.1 to 1.3-RC1
$conditions = array("OR" => array(
'Item.expiration' => 0,
'Item.expiration >' => "NOW()"
)
);
$params = array(
'conditions' => $conditions
);
$items =... 1 answer
0 votes
Mysql Query
Hi all,
I have two main tables 'Students' and 'Sponsors'
The relation between them is HABTM. So there is a middle table named 'Stu_Spon'
I want to get all students who are not sponsored by a particular sponsor.
i.e. if Person 1 is sponsoring students...
1 answer
0 votes
retrieve data from HABTM tables
Hi all
I have two main tables Benefactors and Students. Their relation is HABTM. There is also a third table named Benefactors_Students.
I can print details of a particular Benefactor and corresponding students by something like this:
in the...
1 answer
0 votes
Can't access SQL field in query.
Hello everyone.
This one should be pretty easy for one of you gurus here. So I am going to make it as short as possible.
So, I have got a User model that $hasMany Upload that $hasMany Download. Now, I want to fetch some statistics about how often...