1 answer
0 votes
find conditions
hi all,
Ho do I create this sql with cakephp
SELECT `item`.`id`, `item`.`name_1`, `item`.`name_2`
FROM `item`
WHERE `item`.`name_1` != `item`.`name_2`
Thanks
3 answers
0 votes
Set find() conditions in the model
Hi everybody, I'm brand new to CakePHP and I'm discovering with pleasure its features :)
Is there a "Model property"-like manner (or a property; I couldn't find one in the API doc) to set the find 'fields' and 'conditions' conditions ?
Instead of...
2 answers
0 votes
I can't get a user data condition requested with a null and spesific id
<?php
function someController()
{
$user_id = $this->Session->read('Auth.User.id');
$this->Announcement->recursive = 1;
$this->paginate = array
(
'conditions' => array
(
'Announcement.user_id' => array($user_id,null)
),
'limit'... 1 answer
0 votes
CakePHP paginate conditions in derived fields how?
Hello, i would like to paginate a list of games, where the sport is a chosen sport.
the relatition is as followed:
Game BelongsTo Competition BelongsTo Team BelongsTo sport
What i would like to do is show all games where the teams sport_id = 1.
The...
2 answers
0 votes
multiple LIKE conditions
Hello!
Could you, please, tell me if it is possible to query model table with multiple LIKEs?
I need something like that:
select FirstName, LastName from users
where (FirstName LIKE '%a' OR FirstName LIKE '%b' OR FirstName LIKE '%c')
AND (LastName...