我正在准备以下SQL查询,但它给我错误:
failed to prepare sql query
下面是一些代码行
$sql='UPDATE $empid SET `Status` = ? WHERE `EmpID` = ? AND `ProjectCode` = ? AND `Date` = ? AND `StartTime` = ? AND `EndTime` = ? AND `NoOfHours` = ? AND `TaskPerformed` = ? AND `ModifiedDate` = ?';
$stmt=$conn->prepare( $sql );
if( $stmt ){
$stmt->bind_param( 'isssiiisi', $status, $empid, $projectcode, $date, $stime, $etime, $noofhours, $taskperformed, $modifieddate);
}else{
exit('error: failed to prepare sql query');
}
我正在Windows中使用Wampserver。
请帮助。