Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Array ( [api] => 1 [id] => Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 7 [7] => 8 [8] => 9 [9] => 10 ) [code] => Array ( [0] => mobile [1] => dth [2] => postpaid [3] => landline [4] => billpayment [5] => billpayment [6] => billpayment [7] => billpayment [8] => billpayment [9] => billpayment ) )
- function insertOperatorType($api,&$operator_id,&$code){
- global $mysqli;
- $stmt = $mysqli->prepare('INSERT INTO pd_operator_type(
- api_id,
- operator_id,
- code
- ) VALUES (
- ?,
- ?,
- ?
- )');
- $stmt->bind_param('sss',$api,$operator_id,$code);
- $stmt->execute();
- $inserted_id = $mysqli->insert_id;
- if($inserted_id > 0){
- return $inserted_id;
- } else {
- return "";
- }
- }
- for($i = 0; $i < COUNT($operator_id); $i++){
- insertOperatorType($api,$operator_id[$i],$code[$i]);
- }
Add Comment
Please, Sign In to add comment