News admin panel
git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/trunk@39 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
This commit is contained in:
@ -113,7 +113,10 @@ abstract class Model
|
||||
|
||||
function getList($limit = false, $sort = 'ASC')
|
||||
{
|
||||
return $this->query('SELECT * FROM '.$this->table.' ORDER BY '.$this->primary_key.' '.($sort == 'ASC' ? 'ASC' : 'DESC').($limit === false ? ' LIMIT '.(int) $limit : ''));
|
||||
return $this->query('SELECT *
|
||||
FROM '.$this->table.'
|
||||
ORDER BY '.$this->primary_key.' '.($sort == 'ASC' ? 'ASC' : 'DESC')
|
||||
.($limit !== false ? ' LIMIT '.(int) $limit : ''))->fetchAll();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user