Hello,everyone. Newbie here. 🙂
I have learnt that php supports prepare statement like the following:
$query="INSERT INTO books values (?,?,?,?)";
$stmt=$db->prepare($query);
$stmt->bind_param("sssd",$isbn,$author,$title,$price); <---
$stmt->execute();
The problem lies in the line with an arrow.I have written a class for database operation which accepts field values to accomplish adding record.However,I can't seem to add those field values in this statement via looping.Do you guys know how to work it out?