Closed RNKushwaha closed 9 years ago
Model\Page is a Db\Cortex object, which is extended from the Db\Cursor class. Exec() exists in the Db\Sql class, not in the Db\Cursor nor DB\Cortex (which try to remain database system agnostic I think?). If you have an sql database active, try $db->exec('your sql statement')?
I don't think your problem is tied to the fact your code is inside a controller.
Equivalent to your parents would be:
$f3->set('parents', $parent->find(array('_id != ? and published = ?',$params['id'],1),array('order'=>'title asc')));
@ikkez its working now. Thanks
Hi,
I'm trying to develop a dropdown list of published pages when creating a new page. I just want to assign a parent page for each page. How can I show a list of all published pages excluding the current page and assign it to the current page(like an
about us
,contact us
page underabout
page)?When I write this code it show error in page_edit.htm Internal Server Error Object of class Model\Page could not be converted to string
When I tried this code
It show me error-
Fatal error: Call to undefined method Model\Page::exec()
How can I call exec in a controller?