任何人都可以帮助我找出我做错了什么吗?SQL错误消息:
我得到当我按下提交表单上的此错误消息:
您的SQL语法错误;检查与你的MySQL服务器版本相对应的手册,在'2013-12-10','','dsffsd','dfsfsd','sfdd','sdffsd','sdfsdf','sfdsdf附近使用正确的语法”, 'DSAD' 在行8
,这是PHP代码的行8:
function renderForm($caseref, $casetype, $clienttitle, $clientforename, $clientsurname,
$clientdob, $clienttelhome, $clienttelwork, $clienttelmob, $clientemail,
$clientaddress1, $clientaddress2, $clientaddress3, $clientaddress4, $clientaddress5,
$clientpostcode, $clientoccupation, $clientni, $defendanttitle, $defendantforename,
$defendantsurname, $defendantaddress1, $defendantaddress2, $defendantaddress3,
$defendantaddress4, $defendantaddress5, $defendantpostcode, $defendantvehiclereg,
$defendantpolicyno, $defendantinsurername, $defendantcomments, $softtissue, $boneinjury,
$whiplash, $injurydescription, $timeoffwork, $medicalattention, $attendedhospital,
$hospitalname, $hospitaladdress1, $hospitaladdress2, $hospitaladdress3,
$hospitaladdress4, $hospitaladdress5, $hospitalpostcode, $claimantposition,
$passengernumber, $claimantseatbelt, $ownertitle, $ownerforename, $ownersurname,
$owneraddress1, $owneraddress2, $owneraddress3, $owneraddress4, $owneraddress5,
$ownerpostcode, $drivertitle, $driverforename, $driversurname, $driveraddress1,
$driveraddress2, $driveraddress3, $driveraddress4, $driveraddress5, $driverpostcode,
$clientvehiclemake, $clientvehiclemodel, $clientvehiclereg, $clientinsurername,
$clientpolicyno, $doa, $timeaccident, $accidentlocation, $weatherconditions,
$roadconditions, $accidentcircumstances, $policereported, $namepolice, $incidentref,
$otherinfo, $submitdate, $error)
查询:
INSERT INTO clients (caseref, casetype, clienttitle, clientforename, clientsurname,
submitdate, clientdob, clienttelhome) VALUES ('$caseref', '$casetype', '$clienttitle',
'$clientforename', '$clientsurname', '$submitdate', '$clientdob', '$clienttelhome')
感谢您告诉我们。如果你有问题,请回来问问。 – JohnFx
由于这是一个SQL错误,因此如果您显示查询以及它是如何创建的,它可能会有所帮助。 –
您得到的错误来自生成的SQL查询,而不是您的PHP代码。如果您可以添加查询,我们可能会提供帮助。 – andrewsi