Advertisement
Guest User

PDO

a guest
May 18th, 2015
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $query = "
  2.     INSERT INTO `tbl`(`col0`, `col1`, `col2`, `col3`, `col4`, `col5, `col6`, `col7`)
  3.     VALUES (:one,:two,:three,:four,:five,:six,:seven,:eight)";
  4.  
  5. $record = $db->prepare($query);
  6.  
  7. if($record->execute([':one'=>$one,':two'=>$two,':three'=>$three,':four'=>$four,':five'=>$five,':six'=>$six,':seven'=>$seven,':eight'=>$eight])){
  8.     echo "ok";
  9. }else{
  10.     echo "failed";
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement