-3
<?php
class PublishersController extends AppController
{
public function index()
{
$this->set("publishers",
$this->Publisher->find("all", array('order' => 'company_name ASC')));
}
public function view($id = null)
{
$this->Publisher->id = $id;
$this->set('publisher', $this->Publisher->read());
}
function edit($id = null)
{
$this->Publisher->id = $id;
if (empty($this->data))
{
$this->data = $this->Publisher->findById($id);
}
else
{
if ($this->Publisher->save($this->data))
{
$this->Session->setFlash('Publisher Updated Successfully');
$this->redirect(array('action' => 'index'));
}
}
}
}
?>
, пожалуйста, объясните подробнее –
Это не вопрос – Luceos
Где вы начинаете сеансы? – panther