original_string: protected function createCountries()
      {
          $rows = $placeholders = array();
  
          foreach ((array) $this->getCountryModel()->getIso() as $code => $country) {
              $placeholders[] = '(?,?,?,?,?)';
              $native_name = empty($country['native_name']) ? $country['name'] : $country['native_name'];
              $rows = array_merge($rows, array(0, $country['name'], $code, $native_name, serialize(array())));
          }
  
          $values = implode(',', $placeholders);
          $sql = "INSERT INTO country (status, name, code, native_name, format) VALUES $values";
          $this->db->run($sql, $rows);
      }
code: protected function createCountries()
      {
          $rows = $placeholders = array();
  
          foreach ((array) $this->getCountryModel()->getIso() as $code => $country) {
              $placeholders[] = '(?,?,?,?,?)';
              $native_name = empty($country['native_name']) ? $country['name'] : $country['native_name'];
              $rows = array_merge($rows, array(0, $country['name'], $code, $native_name, serialize(array())));
          }
  
          $values = implode(',', $placeholders);
          $sql = "INSERT INTO country (status, name, code, native_name, format) VALUES $values";
          $this->db->run($sql, $rows);
      }
code_tokens: protected function createCountries ( ) { $ rows = $ placeholders = array ( ) ; foreach ( ( array ) $ this -> getCountryModel ( ) -> getIso ( ) as $ code => $ country ) { $ placeholders [ ] = '(?,?,?,?,?)' ; $ native_name = empty ( $ country [ 'native_name' ] ) ? $ country [ 'name' ] : $ country [ 'native_name' ] ; $ rows = array_merge ( $ rows , array ( 0 , $ country [ 'name' ] , $ code , $ native_name , serialize ( array ( ) ) ) ) ; } $ values = implode ( ',' , $ placeholders ) ; $ sql = "INSERT INTO country (status, name, code, native_name, format) VALUES $values" ; $ this -> db -> run ( $ sql , $ rows ) ; }
docstring: Creates countries from ISO list
docstring_tokens: Creates countries from ISO list