-2
我正在更新從表單發佈的數據。 其中一列是mysql中的datatime數據類型。在laravel5中更新日期數據類型
除日期時間列外,所有數據都在更新。
我的代碼如下
DB::table('CANDIDATE')
->where('CANDIDATEID',$ID)
->update(
[
'fname'=>$fname
,'mname'=>$mname
,'lname'=>$lname
,'genderid'=>$GENDERID
,'dob'=>$dob
,'address'=>$address
,'city'=>$city
,'pinno'=>$pinno
,'statesid'=>$STATESID
,'countryid'=>$COUNTRYID
,'contactno'=>$contactno
,'industryprtid'=>$INDUSTRYPRTID
,'cur_prof_titl'=>$cur_prof_titl
,'skills'=>$skills
,'certificate'=>$certificate
,'emp_typeid'=>$EMPTYPEID
,'experienceid'=>$EXPERIENCEID
,'educationid'=>$EDUCATIONID
,'edu_major'=>$edu_major
,'other_detail'=>$other_detail
,'mainobj'=>$mainobj
,'relocate'=>$relocate
,'sal_rngid'=>$sal_rngid
]
);
什麼是錯的代碼。
哪一列是DateTime列?那麼您在該列中使用的參數是什麼? – RiggsFolly
@RiggsFolly - DOB(出生日期)是Datetime列。我也刪除了fname,但仍然是DOB列不起作用 – Kash
您使用了哪種數據類型作爲'dob'並且您傳遞了什麼值? –