home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (kazakhstan_398_1.cif)

This example Drupal source code file (kazakhstan_398_1.cif) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

array, database, db_query, foreach, function, insert, into, kor, php, sql, values, zone, zones

The kazakhstan_398_1.cif Drupal example source code

<?php
// $Id: kazakhstan_398_1.cif,v 1.1.4.6 2010/04/14 05:18:19 tr Exp $

function kazakhstan_install() {
  db_query("INSERT INTO {uc_countries} (country_id, country_name, country_iso_code_2, country_iso_code_3, version) VALUES (398, 'Kazakhstan', 'KZ', 'KAZ', 1)");

  $zones = array(
    array(398, 'ALA', 'Алматы'),
    array(398, 'TSE', 'Астана'),
    array(398, 'AKM', 'Акмолинская область'),
    array(398, 'AKT', 'Актюбинская область'),
    array(398, 'ALM', 'Алматинская область'),
    array(398, 'ATR', 'Атырауская область'),
    array(398, 'EKZ', 'Восточно-Казахстанская область'),
    array(398, 'DZH', 'Жамбылская область'),
    array(398, 'WKZ', 'Западно-Казахстанская область'),
    array(398, 'KAR', 'Карагандинская область'),
    array(398, 'KOR', 'Кызылординская область'),
    array(398, 'KUS', 'Костанайская область'),
    array(398, 'MAN', 'Мангистауская область'),
    array(398, 'PVL', 'Павлодарская область'),
    array(398, 'NKZ', 'Северо-Казахстанская область'),
    array(398, 'SKZ', 'Южно-Казахстанская область'),
  );

  foreach ($zones as $zone) {
    db_query("INSERT INTO {uc_zones} (zone_country_id, zone_code, zone_name) VALUES (%d, '%s', '%s')", $zone);
  }

  uc_set_address_format(398, "!company\n!first_name !last_name\n!street1\n!street2\n!postal_code !city\n!country_name_if");
}

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal kazakhstan_398_1.cif source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.