Welcome Guest, Not a member yet? Register   Sign In
Call to a member function getFirstRow() on bool
#1

I am converting from codeigniter 3 to 4. I would like to use the find function, but I get Call to a member function getFirstRow () on bool

Model

PHP Code:
namespace App\Models;

use 
CodeIgniter\Model;
use 
App\Entities\Studente_e;

class 
Studente_m extends Model
{
protected 
$table      'tblstudenti';
protected 
$primaryKey 'NUM_MATRIC';
protected 
$useAutoIncrement true;
protected 
$returnType 'App\Entities\Studente_e'// configure entity to studebnte
protected $useSoftDeletes true;

protected 
$allowedFields = ['name''email'];

/*protected $useTimestamps = false;
protected $createdField  = 'created_at';
protected $updatedField  = 'updated_at';
protected $deletedField  = 'deleted_at';*/

protected $validationRules    = [];
protected 
$validationMessages = [];
protected 
$skipValidation    false;
protected 
$useTimestamps true;
function 
verifica_stud($id$email){
return 
$result $stud_m->find($id$email);
}} 


Controller

PHP Code:
namespace App\Controllers;
use 
CodeIgniter\Controller;
use 
App\Models\login_m;
use 
App\Models\studente_m;
use 
App\Models\professore_m;

use 
App\Libraries\MY_Form_validation;

class 
Registra extends BaseController
{
public function 
__construct()
{...
$this->studente_m= new studente_m();
...}
public function 
index()
{...
$query $this->studente_m->verifica_stud($id$email);
...} 
Reply


Messages In This Thread
Call to a member function getFirstRow() on bool - by lucavalentino - 07-07-2021, 05:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB