当前位置: 首页>>代码示例>>PHP>>正文


PHP XDB::rawFetchColumn方法代码示例

本文整理汇总了PHP中XDB::rawFetchColumn方法的典型用法代码示例。如果您正苦于以下问题:PHP XDB::rawFetchColumn方法的具体用法?PHP XDB::rawFetchColumn怎么用?PHP XDB::rawFetchColumn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XDB的用法示例。


在下文中一共展示了XDB::rawFetchColumn方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: while

$j = 0;
while ($item = $it->next()) {
    $phone = new Phone($item);
    $phone->delete();
    $phone->save();
    ++$i;
    ++$j;
    if ($j == 100) {
        $j = 0;
        printf("\r%u / %u", $i, $total);
    }
}
printf("\r%u / %u", $i, $total);
print "\nFormating done.\n\n";
print "Deletes duplicated phones. (4/4)\n";
$pids = XDB::rawFetchColumn("SELECT  DISTINCT(pid)\n                               FROM  profile_phones AS p1\n                              WHERE  link_type = 'user' AND EXISTS (SELECT  *\n                                                                      FROM  profile_phones AS p2\n                                                                     WHERE  p2.link_type = 'user' AND p2.pid = p1.pid AND p2.tel_id != p1.tel_id)\n                           ORDER BY  pid");
$total = count($pids);
$done = 0;
$aux = 0;
$deleted = 0;
$phones = array();
$duplicates = array();
foreach ($pids as $pid) {
    $count = 0;
    $it = Phone::iterate(array($pid), array(Phone::LINK_PROFILE), array(0), Visibility::get(Visibility::VIEW_PRIVATE));
    while ($item = $it->next()) {
        $phones[] = $item;
        ++$count;
    }
    for ($i = 0; $i < $count; ++$i) {
        for ($j = $i + 1; $j < $count; ++$j) {
开发者ID:Ekleog,项目名称:platal,代码行数:31,代码来源:merge_issues.php

示例2: getPIDList

 private function getPIDList($pids = null, PlLimit $limit)
 {
     $this->requireProfiles();
     $this->buildQuery();
     $lim = $limit->getSql();
     $cond = '';
     if (!is_null($pids)) {
         $cond = XDB::format(' AND p.pid IN {?}', $pids);
     }
     $fetched = XDB::rawFetchColumn('SELECT  SQL_CALC_FOUND_ROWS  p.pid
                                    ' . $this->query . $cond . '
                                    GROUP BY  p.pid
                                    ' . $this->orderby . '
                                    ' . $lim);
     $this->lastprofilecount = (int) XDB::fetchOneCell('SELECT FOUND_ROWS()');
     return $fetched;
 }
开发者ID:Ekleog,项目名称:platal,代码行数:17,代码来源:userfilter.php


注:本文中的XDB::rawFetchColumn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。