2017-08-12 11 views
0

私のコードはデータベースで動作しません。ここでパスワードを忘れた場合Codeigniter3

それがデータベースで実行されませんので、この方法で間違っているものを私に教えてfunction.please私のモデルである:

Login_model.php

public function forgot_password() 
{ 
    $this->db->select('*'); 
    $this->db->from('tblmvbsystemusers'); 
    $this->db->where('sysu_email',$this->input->post('email')); 
    $this->db->where('sysu_status','1'); 
    $query=$this->db->get(); 
    $row=$query->row(); 
    send_mail($row->sysu_name,$row->sysu_email,'admin_password_help',$row->sysu_email); 
    if ($query->num_rows() == 1) 
     return true; 
    else 
     return false; 
} 
+0

もしその方法がDBに格納されていれば(つまり、$ this-> db-> where( 'sysu_status'、1);)、チェックしてください。 – Tpojka

答えて

0

最後印刷してくださいには、使用できるクエリ を実行しました次の構文に従います。

$this->db->last_query(); 

これをコピーしてphpmyadminで手動で実行します。 より良い結果が表示されます

関連する問題