2011-08-09 35 views
-2
public static function validateLogin($username,$password) 
    { 
     $select = $this->select(); 
     $select->where('user_name=?',$username); 
     $select->where('password=?',$password); 
     $row = $this->fetchRow($select); 
     If($row) 
     { 
      return $row; 
     } 

    } 

此代碼不能正常工作,幫助...爲什麼我的登錄功能無效?

+0

是thow任何異常或錯誤?結果可用正常的php運行。 (數據是否可用?) –

回答

0

嘗試使用它,而不使用$這在靜態函數中沒有上下文。

你可以使用

$model = new self; $model->select();

+0

似乎解決了一半的問題... – chris

+0

現在的錯誤信息是什麼? – ChrisA

相關問題