I'm having a little problem with converting an old sql request to use
cakephp.
The sql is:
select name, if(module_id is null,0,1) activated from module left join
active_modules on (id = module_id and res_id = $id)
I have something like:
----
var $useTable = "modules";
var $belongsTo = array(
"active_modules" => array(
"className" => "ActiveModules",
"foreignKey" => "module_id",
)
);
---
not sure how to proceed. What do I do with "if(module_id is null,
0,1)" ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment