@lyba:
I assumed that you are not skilled in developing at all!
Usually only a newby would make the mistake to use the same array key
in the same array
'OR'=> array('title'=>null, 'title'=>$TitleArray)
thats why I assumed it would be better for you NOT to use non-
determinant values
(in order to avoid above issues) and thats why i pointed that out.
but it seems you do know a little bit about that matter. so i
apologize.
so for your original topic:
use arrays inside arrays to use the same array key more than once and
it is supposed to work as well
always under the assumption that you are skilled enough to handle the
NULL cases and its required "special" treatment at some point.
and NO - its not needed at all. its possible. thats what i said. it is
possible to use it.
but if it can be avoided it should be avoided.
if you have a long story behind it, so be it. you dont have to justify
it. you dont have to believe me :)
but others should not blindly follow you in a possible trap. so in the
end the rest of this topic is not so much for you but to help others.
On 4 Okt., 21:38, lyba <[email protected]> wrote:
> This post is about cake's inability to handle null in OR statements
> using default (documented) convention.
>
> This post gives a workaround solution in hope that others like me do
> not waste a day researching why results they are getting from find()
> are not backing up cake's documentation.
>
> No need to discuss whether null should or should not be used. This
> post is not about that. The documentation page (http://
> book.cakephp.org/view/1030/Complex-Find-Conditions) about find gives
> examples with null (in title in fact) - therefore I assume there are
> plenty reasons why it is needed there.
>
> As for my reason:
> I work with actions on objects. Actions require a tool (means rather
> but let's simplify here) to perform it. I am looking for actions that
> can be performed because I posses required tools (my IN statement) or
> they do not require any tool (null statement). Action model belongs to
> Tool model (don't ask why only one - there is a longer story behind
> this question). I am looking for for a foreign id using find (not an
> empty string, not a 0).
>
> Now, please leave this post as is unless there is an alternative
> solution to the original question posted.
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" 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