Advertisement
Flip

Untitled

Sep 18th, 2014
356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.97 KB | None | 0 0
  1.     $data = json_decode($json);
  2.     foreach ($data->result as $i) {
  3.         $q = $db->prepare("INSERT INTO equipment (id,name,attack,defense,perception,equipType,eng,sta,hnr,atk,def,power,dmg,deflect,proc_name,proc_desc) VALUES (:id,:name,:attack,:defense,:perception,:equipType,:eng,:sta,:hnr,:atk,:def,:power,:dmg,:deflect,:proc_name,:proc_desc)");
  4.         $q->bindParam(':id', $i->id);
  5.         $q->bindParam(':name', $i->name);
  6.         $q->bindParam(':attack', $i->attack);
  7.         $q->bindParam(':defense', $i->defense);
  8.         $q->bindParam(':perception', $i->perception);
  9.         $q->bindParam(':equipType', $i->equipType);
  10.         $q->bindParam(':eng', $i->eng);
  11.         $q->bindParam(':sta', $i->sta);
  12.         $q->bindParam(':hnr', $i->hnr);
  13.         $q->bindParam(':atk', $i->atk);
  14.         $q->bindParam(':def', $i->def);
  15.         $q->bindParam(':power', $i->power);
  16.         $q->bindParam(':dmg', $i->dmg);
  17.         $q->bindParam(':deflect', $i->deflect);
  18.         $q->bindParam(':proc_name', $i->proc_name);
  19.         $q->bindParam(':proc_desc', $i->proc_desc);
  20.         $q->execute();
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement