复制内容到剪贴板
代码:
$stdato= $this->dateInit->Text;
$sldato= $this->datoEnd->Text;
if($stdato == ""){
$time = strtotime("2007-10-01 00:00:00");
$begdate = date('Y-m-s H:M:S',$time);
}
else{
$begdate = $stdato;
}
if($sldato == ""){
$time = strtotime('now');
$enddate = date('Y-m-s H:M:S',$time);
}
else{
$enddate = $sldato;
}
$indsat= mysql_query("Update bestilling set paid = now(), swpaid = 'ja' where orddato>='".$begdate."' and orddato<='".$enddate."' and payslip ='".$payslip."'") or die(mysql_error());
$this->qrybestilling->Close();
$this->qrybestilling->LimitStart = '-1';
$this->qrybestilling->LimitCount = '-1';
$this->qrybestilling->SQL = $indsat;
$this->qrybestilling->Open();就得到一个
mysql的错误信息
复制内容到剪贴板
代码:
[1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 where payslip='1' order by orddato asc' at line 1] in EXECUTE("1 where payslip='1' order by orddato asc ")