0
Gale do not know if I did correctly, I have 2 users, admin and distributor, I created 2 tables, do not know if I did the correct, admin has only id name email and password, already the distributor has id name email password and other more fields.... is it correct to create 2 separate tables, or a single table for the 2 users ? As I made 2 tables, I enclosed in the following: in the login I did with only one table...but I need the 2 users to login..
a CRUD of life is 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;
galera how to log in in this case of 2 tables ?
Why didn’t you make a column called type = x? then check what the type is, and log?
– Sr. André Baill