I'm trying to execute a query like this one :

SELECT Resultat.id , IF ( Resultat.message IS NULL , NULL , 1)
FROM `resultats` AS `Resultat`
WHERE ...

or

SELECT Resultat.id , LENGTH(Resultat.message)
FROM `resultats` AS `Resultat`
WHERE ...

and to return the result as Array of records

I know this is mysql specific fonction and that wouldn't work on
another dbengine but this is a performance problem : the message field
is a text one and could be very long and everything I need to know if
it is empty or not.

I can do this by merging 2 result but that's not really like usual
cake's magic.

Any Idea?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to