×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Mike MacDonald
Added: Jul 1, 2017 12:42 AM
Views: 6
Tags: no tags
Insert Select Update and Delete
  1. $stmt = $db->prepare("INSERT INTO table(field1,field2,field3,field4,field5) VALUES(:field1,:field2,:field3,:field4,:field5)");
  2. $stmt->execute(array(':field1' => $field1, ':field2' => $field2, ':field3' => $field3, ':field4' => $field4, ':field5' => $field5));
  3. $affected_rows = $stmt->rowCount();