Gale I do not know if I did it right, I have 2 users, admin and distributor, I created 2 tables, I do not know if I did the correct one, admin has only id name email and password, since the distributor has id name email password and other fields more .... is it correct to create 2 distinct tables, or a single table for the 2 users? As I did 2 tables, I packed the following: I just logged in with a table ... but I need the 2 users to log in ..
A CRUD of life looks like this:
public function select($fields,$table,$cond,$exec){
$this->prepExc('SELECT '.$fields.' FROM '.$table.' '.$cond.' ',$exec);
return $this->query;
}
I have this login class:
$this->log = $this->senha == $senha?
$this->crud->select('*','administrador','WHERE email = ? && senha = ?',array($this->email,$this->cpt->setCripto($this->senha))):
FALSE;
how can I sign in this case with 2 tables?