Joined table setter and getter

Hi all,

i create a query like that :

 $sql = "SELECT * FROM BlogText where status = '1'";

    if($params)
    {

        if(isset($params['category_id']))
        {
            $sql .= " and category_id = '".$params['category_id']."'";
        }

        if(isset($params['author_id']))
        {
            $sql .= " and author_id = '".$params['author_id']."'";
        }


    }


    $sql .= " LIMIT 12 OFFSET $page";

my models has getter and setter . When i want to join blog author table to that table with Inner Join getter and setters not working. Couldnt find any getter and setter .How can i solve that ?



5.4k

Could your issue have something to do with what is discussed here: http://forum.phalconphp.com/discussion/2409/a-cry-for-help-while-using-joins-in-phalcon?

I.e.; you have to specifiy all joined tables in the SELECT statement?