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!
text 0.39 KB | None | 0 0
  1. $query = "INSERT INTO `tbl`(`col0`, `col1`, `col2`, `col3`, `col4`, `col5, `col6`, `col7`) VALUES (:one,:two,:three,:four,:five,:six,:seven,:eight)";
  2. $record = $db->prepare($query); if($record->execute([':one'=>$one,':two'=>$two,':three'=>$three,':four'=>$four,':five'=>$five,':six'=>$six,':seven'=>$seven,':eight'=>$eight])){
  3. echo "ok";
  4. }else{
  5. echo "failed";
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement