sdwebserver/app/Models/BaseModel.php
Alfonso Saavedra "Son Link 199639a2f1
The fastest laps for each track and category are now stored in a separate table.
To create the new table, as well as to populate it, you have to run the SQL script export_best_laps.sql
2024-11-30 10:57:59 +01:00

25 lines
456 B
PHP

<?php
namespace App\Models;
use CodeIgniter\Model;
class BaseModel extends Model
{
protected $primaryKey = 'id';
protected $returnType = 'object';
protected $validationRules = [];
protected $validationMessages = [];
protected $skipValidation = false;
public function data($id)
{
$builder = $this->builder();
$builder->where('id', $id);
$query = $builder->get(1);
if ($query) return $query->getRow();
}
}