I have user model in where i need to select some other related models, however my query is not a standard one, so i dont think i can use find() or query:: to get the result, so i am thinking to use "modelmanager" and its phql to do the job, however i get empty set as result why is that
SQL Query is
SELECT title FROM var_religion WHERE (15 & (1 << (id - 1))) ORDER BY id DESC
however when use following function insde user model it doesnt seems to be working any idea ?
public function partner(){
//$p_religions = VarReligion::find(
// array(
// "conditions" => " (:var: & (1 << (id - 1))) ",
// "bind" => array("var"=> $this->religion),
// "order" => "id DESC"
// )
//);
$phql = "SELECT title FROM var_religion WHERE (15 & (1 << (id - 1))) ORDER BY id DESC";
$p_religions = $this->manager->executeQuery($phql);
var_dump($p_religions);
}
i get no output why ?? how do i do this query ?