i have mysql code for input data:
$sql = "INSERT IGNORE INTO inspection_report ";
$sql.= "(Model, Serial_number, Line, Shift, Inspection_datetime, Range_sampling, Packing, ";
$sql.= "Accesories, Appearance, Tuner, General_operation, Class, Status, Remark, ";
$sql.= "NIK) ";
$sql.= "VALUES ('";
$sql.= $Model."','".$Serial_number."', '".$Line."','".$Shift."','".postVar('insp_date')." ".postVar('time')."','".$Range_sampling."','".$Packing."','";
$sql.= $Accesories."','".$Appearance."','".$Tuner."','".$General_operation."','".$Class."','".$Status."','".$Remark."','";
$sql.= $NIK."')";
i want to use IGNORE.but how to prevent duplicate only at Model,Serial_number,Line?
From the documentation
INSERT
So that tells me that either
Model,Serial_number,Linemust be the Primary key, or you need to create an Unique index on these columns.