I have app in Kohana 3.1 and it was woring fine on PHP 5.4
But after migration this DB query is not working:
DB::select(array('MAX("art_nr")', 'art_nr'))->from('wi_artykuly')->execute()->get('art_nr');
If any function is depricated or something?
EDIT
Here's full function:
public function create(Validation $validation = NULL)
{
if(! isset($this->art_nr))
{
$intMax = DB::select(array('MAX("art_nr")', 'art_nr'))->from('wi_artykuly')->execute()->get('art_nr');
$this->art_nr = $intMax+1;
}
return parent::create($validation);
}
I've changed DB:query to PDO prepare and fetch.
If anyone wants a code please write.