api/App/Models/Data.php

24 lines
442 B
PHP

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