Skip to content

Commit 6f0d479

Browse files
committed
Fixed #3, Update demo
1 parent 1e9c163 commit 6f0d479

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

demo/app/Drivers/MysqlLogModel.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,27 +42,27 @@ public function push($loggedId, $on, $entity, $log)
4242
*
4343
* @return mixed
4444
*/
45-
public function logsCount($whereArray)
45+
public function logsCount($where)
4646
{
4747
$query = $this->baseClass->db->prepareQuery('SELECT count(*) AS count FROM `logs`');
48-
$query->prepareWhere($whereArray);
48+
$query->prepareWhere($where);
4949
$row = $this->baseClass->db->pdoQuery($query->getQuery(), $query->getParams())->result();
5050
return $row['count'];
5151
}
5252

5353
/**
5454
* @param $start
5555
* @param $limit
56-
* @param $whereArray
56+
* @param $where
5757
* @param string $order
5858
* @param string $sort
5959
*
6060
* @return mixed
6161
*/
62-
public function logs($start, $limit, $whereArray, $order = 'logs.log_id', $sort = 'DESC')
62+
public function logs($where = [], $order = 'id', $sort = 'DESC', $limit = 30, $start = 0)
6363
{
6464
$query = $this->baseClass->db->prepareQuery('SELECT * FROM `logs`');
65-
$query->prepareWhere($whereArray);
65+
$query->prepareWhere($where);
6666
$query->prepareOrder($order, $sort);
6767
$query->prepareLimit($limit, $start);
6868

0 commit comments

Comments
 (0)