我在下面的代碼中收到錯誤。 請別人幫我解決它。錯誤:date()期望參數2很長,給出的字符串爲
型號
function getappointmentlist($practicien , $datee) {
$this->load->helper('date');
$this->db->select('*');
$this->db->from('rdv');
$this->db->join('contact', 'contact.id = rdv.contact_id');
$this->db->where('people_id',$practicien);
$this->db->where(date('Y-m-d' , 'day'), $datee);
$this->db->order_by('startTime', 'ASC');
$query = $this->db->get();
return $query;
}
我得到以下錯誤:遇到 一個PHP錯誤
Severity: Warning
Message: date() expects parameter 2 to be long, string given
Filename: models/appointment.php
Line Number: 16
Input values :
$practicien = 18
$datee = 2013-05-13
PS:天是在表RDV一個字段。在一天前場數據:2012-02-15 9時41分35秒
什麼是'一天'?數據庫表中的列? – Ramesh
是的,天是rdv表中的一個列ex data:2012-02-15 09:41:35 – Sparkz