On May 29, 8:53 pm, weckmann <[EMAIL PROTECTED]> wrote:
> That is a small workaround... because then i can get the value
> returned by the function by calling $result[0]
> ['my_custom_function(users'][id] ... and I also have all other values
> before.
>
> But that workaround does not work if you need to call more than one
> function. It only works if you call just "normal" columns and in the
> end one single speciality.
>
> And also, if you have a function with more than 2 parameters, things
> are getting much worse because then there is another "," in the string
> and Cake get really crazy about this ;-)
>
> So, I guess, I have to avoid using functions... or only use on in the
> end of the string? Or does anyone have a rabbit hidden in his had for
> me?
alias your function calls.
$sqlstring = "select users.id, users.name,
my_custom_function(users.id, 'ABC') as functionResult, users.phone
from users where
users.id > 500;";
$result = $this->User->query($sqlstring);
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---