[EMAIL PROTECTED] wrote: > 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. >
You can make it in model functions, but this is working only with mysql. Maybe you can make more models if you want to use with more db engines. -- Ámon Tamás http://linkfelho.amon.hu --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
