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


PHP XDB::rawIterRow方法代碼示例

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


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

示例1: handler_issues_promo

 function handler_issues_promo($page, $action = '')
 {
     $page->changeTpl('fusionax/promo_issues.tpl');
     if ($action == 'edit') {
         S::assert_xsrf_token();
         $issues = XDB::rawIterRow('SELECT  p.pid, pd.directory_name, pd.promo, pm.entry_year_ax, pe.entry_year, pe.grad_year
                                      FROM  profile_merge_issues AS pm
                                INNER JOIN  profiles             AS p  ON (pm.pid = p.pid)
                                INNER JOIN  profile_display      AS pd ON (pd.pid = p.pid)
                                INNER JOIN  profile_education    AS pe ON (pe.pid = p.pid AND FIND_IN_SET(\'primary\', pe.flags))
                                     WHERE  FIND_IN_SET(\'promo\', pm.issues)
                                  ORDER BY  pd.directory_name');
         while (list($pid, $name, $promo, $deathAX, $deathXorgEntry, $deathXorgGrad) = $issues->next()) {
             $choiceXorg = Post::has('XORG_' . $pid);
             if (!(Post::has('display_' . $pid) && Post::has('entry_' . $pid) && Post::has('grad_' . $pid))) {
                 continue;
             }
             $display = Post::i('display_' . $pid);
             $entry = Post::i('entry_' . $pid);
             $grad = Post::i('grad_' . $pid);
             if (!($grad <= $entry + 5 && $grad >= $entry + 3 && ($display >= $entry && $display <= $grad - 3))) {
                 $page->trigError("La promotion de {$name} n'a pas été corrigée.");
                 continue;
             }
             XDB::execute('UPDATE  profile_display
                              SET  promo = {?}
                            WHERE  pid = {?}', 'X' . $display, $pid);
             XDB::execute('UPDATE  profile_education
                              SET  entry_year = {?}, grad_year = {?}
                            WHERE  pid = {?} AND FIND_IN_SET(\'primary\', flags)', $entry, $grad, $pid);
             $page->trigSuccess("La promotion de {$name} a bien été corrigée.");
         }
     }
     $issues = XDB::rawFetchAllAssoc('SELECT  p.pid, p.hrpid, pd.directory_name, pd.promo, pm.entry_year_ax, pe.entry_year, pe.grad_year
                                        FROM  profile_merge_issues AS pm
                                  INNER JOIN  profiles             AS p  ON (pm.pid = p.pid)
                                  INNER JOIN  profile_display      AS pd ON (pd.pid = p.pid)
                                  INNER JOIN  profile_education    AS pe ON (pe.pid = p.pid AND FIND_IN_SET(\'primary\', pe.flags))
                                       WHERE  FIND_IN_SET(\'promo\', pm.issues)
                                    ORDER BY  pd.directory_name');
     $page->assign('issues', $issues);
     $page->assign('total', count($issues));
 }
開發者ID:Ekleog,項目名稱:platal,代碼行數:43,代碼來源:fusionax.php


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