当前位置: 首页>>代码示例>>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;未经允许,请勿转载。