I'm struggling to find a way to accomplish this, I can find many examples of how to do this with a loop, or perhaps even in php but the way we have this statement set up I can't get anything to work.
I will specify the amount of duplicates I want inserted in to the table, in this case 5... how do I run this that many times without a stored procedure? I hope this is the right place to seek some help.
$duplicates=5; $sql="INSERT INTO Plate (Thickness, Grade, Length, Width, DimC, DimD, Tag, Win, Cost, Heat, Crop, PoNum, NestNum, Origin, Location, MachTime, PMachine, SetupTime, Facility, POExRate)"; $sql=$sql . " VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) "; $stmt = $db->prepare_query($sql, array( $Thickness, $Grade, $Length, $Width, $DimC, $DimD, $Tag, $Win, $Cost, $Heat, $Crop, $PoNum, $NestNum, $Origin, $Location, $MachTime, $PMachine, $SetupTime, $Facility, $POExRate));