Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $data = json_decode($json);
- foreach ($data->result as $i) {
- $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)");
- $q->bindParam(':id', $i->id);
- $q->bindParam(':name', $i->name);
- $q->bindParam(':attack', $i->attack);
- $q->bindParam(':defense', $i->defense);
- $q->bindParam(':perception', $i->perception);
- $q->bindParam(':equipType', $i->equipType);
- $q->bindParam(':eng', $i->eng);
- $q->bindParam(':sta', $i->sta);
- $q->bindParam(':hnr', $i->hnr);
- $q->bindParam(':atk', $i->atk);
- $q->bindParam(':def', $i->def);
- $q->bindParam(':power', $i->power);
- $q->bindParam(':dmg', $i->dmg);
- $q->bindParam(':deflect', $i->deflect);
- $q->bindParam(':proc_name', $i->proc_name);
- $q->bindParam(':proc_desc', $i->proc_desc);
- $q->execute();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement