$entry = Model_Article::find('last', array( 'where' => array('category_id', 1), 'order_by' => array('date' => 'desc') ));
$entry = Model_Article::find('last', array( 'where' => array('category_id' => 1), 'order_by' => array('date' => 'desc') ));
$news = Model_Article::find($id, array('where' => array('type' => 'news')));
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NEWS ('id', '=', '1') LIMIT 1' at line 1 SELECT `t0`.`id` AS `t0_c0`, `t0`.`type` AS `t0_c1`, `t0`.`title` AS `t0_c2`, `t0`.`content` AS `t0_c3`, `t0`.`author_id` AS `t0_c4`, `t0`.`created_at` AS `t0_c5`, `t0`.`updated_at` AS `t0_c6`, `t0`.`published` AS `t0_c7`, `t0`.`published_at` AS `t0_c8`, `t0`.`furl` AS `t0_c9`, `t0`.`category_id` AS `t0_c10` FROM `articles` AS `t0` WHERE `t0`.`type` NEWS ('id', '=', '1') LIMIT 1
It looks like you're new here. If you want to get involved, click one of these buttons!