This is my function, and it pulls the value in but only the once, it’s very strange. Is there some caching going on somewhere?
// New ID Function
public function newid()
{
//
$db = \Config\Database::connect();
$builder = $db->table('radios');
$query = $builder->get();
if($builder->countAllResults() > 0){
// Return latest ID
$builder->selectMax('radioID');
$builder->get();
$row = $query->getRow();
$topID = $row->radioID;
//print_r($topID);
$topID++;
return $topID;
}
}