當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Phone::linkType方法代碼示例

本文整理匯總了PHP中Phone::linkType方法的典型用法代碼示例。如果您正苦於以下問題:PHP Phone::linkType方法的具體用法?PHP Phone::linkType怎麽用?PHP Phone::linkType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Phone的用法示例。


在下文中一共展示了Phone::linkType方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

#!/usr/bin/php5
<?php 
require_once 'connect.db.inc.php';
$globals->debug = 0;
//do not store backtraces
$phones = array('AF' => '93', 'AN' => '599', 'BY' => '375', 'FM' => '691', 'GE' => '995', 'GL' => '299', 'ID' => '62', 'IL' => '972', 'IN' => '91', 'IQ' => '964', 'IR' => '98', 'JO' => '962', 'JP' => '81', 'KG' => '996', 'KW' => '965', 'KZ' => '7', 'LA' => '856', 'LB' => '961', 'LK' => '94', 'MM' => '95', 'MN' => '976', 'MV' => '960', 'MY' => '60', 'NP' => '977', 'OM' => '968', 'PH' => '63', 'PK' => '92', 'QA' => '974', 'SA' => '966', 'SG' => '65', 'SY' => '963', 'TH' => '66', 'TJ' => '992', 'TM' => '993', 'TR' => '90', 'TW' => '886', 'UZ' => '998', 'VG' => '1284', 'VN' => '84', 'YE' => '967');
foreach ($phones as $country => $phone) {
    XDB::execute('UPDATE  geoloc_countries
                     SET  phonePrefix = {?}
                   WHERE  iso_3166_1_a2 = {?}', $phone, $country);
}
$res = XDB::iterator('SELECT  pid, link_type, link_id, tel_id AS id, search_tel AS search, search_tel AS display
                        FROM  profile_phones
                       WHERE  search_tel LIKE \'33%\'');
while ($item = $res->next()) {
    $phone = new Phone($item);
    $phone->format();
    XDB::execute('UPDATE  profile_phones
                     SET  display_tel = {?}
                   WHERE  pid = {?} AND link_type = {?}
                          AND link_id = {?} AND tel_id = {?}', $phone->display, $phone->pid(), $phone->linkType(), $phone->linkId(), $phone->id());
}
/* vim:set et sw=4 sts=4 ts=4: */
開發者ID:Ekleog,項目名稱:platal,代碼行數:23,代碼來源:phone.php


注:本文中的Phone::linkType方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。