24 lines
478 B
PHP
24 lines
478 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Core\Model;
|
|
use PDO;
|
|
|
|
/**
|
|
* Example user model
|
|
*
|
|
* PHP version 7.0
|
|
*/
|
|
class XmJobCnt extends Model
|
|
{
|
|
public $tableName = 'xmjobcnt';
|
|
public function getAll($limit,$offset) {
|
|
$db = static::getDB();
|
|
$query = 'SELECT * FROM xmjobcnt ORDER BY `timestamp` desc ' . 'limit ' . strval($limit) . ' offset ' . strval($offset);
|
|
$stmt = $db->query($query);
|
|
return $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
}
|
|
|
|
}
|