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


PHP slog::sqlinboards方法代码示例

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


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

示例1: substr

     if ($str[0] == '-') {
         $not = 'NOT ';
         $str = substr($str, 1);
     } else {
         $not = '';
     }
     if ($i > 0) {
         $sql_where_like .= $op . $not;
     }
     if ($_POST['opt_0'] == 0) {
         $sql_where_like .= "(r.topic LIKE{$binary} '%{$str}%' OR r.comment LIKE{$binary} '%{$str}%') ";
     } else {
         $sql_where_like .= "r.topic LIKE{$binary} '%{$str}%' ";
     }
 }
 $sql_where = $slog->sqlinboards('r.board', 1, $boards) . " ";
 if (count($used) > 0) {
     $sql_where .= "({$sql_where_like}) ";
 }
 if (isset($rname)) {
     if (count($used) > 0) {
         $sql_where .= "AND ";
     }
     $sql_where .= "r.name = '{$rname}' ";
 }
 if (strxlen($_POST['name']) >= $config['searchminlength']) {
     $used[] = $_POST['name'];
 } else {
     $ignored[] = $_POST['name'];
 }
 $having = '';
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:search.php

示例2: UniversalFeedCreator

// Header of feeds
$rss = new UniversalFeedCreator();
$rss->encoding = $lang->phrase('charset');
$rss->setDir("feeds/topics_");
$rss->useCached($action, '', $h);
$rss->title = $config['fname'];
$rss->description = $config['fdesc'];
$rss->link = $config['furl'] . "/forum.php";
$rss->language = $lang->phrase('rss_language');
$rss->ttl = $config['rssttl'];
$rss->copyright = $config['fname'];
$rss->lastBuildDate = time();
$rss->editor = $config['fname'];
$rss->editorEmail = $config['forenmail'];
$sqllimit = 15;
$sqlwhere = "r.tstart = '1' AND f.invisible != '2' AND f.active_topic = '1' AND f.opt != 'pw' " . $slog->sqlinboards('t.board');
$sqlorder = "t.date DESC";
$sqljoin = $sqlfields = '';
($code = $plugins->load('external_query')) ? eval($code) : null;
// Get the last 15 topics
$result = $db->query("\nSELECT r.dowords, r.comment, r.guest, f.name as forum, u.name as uname, u.mail as umail, r.name as gname, r.email as gmail, t.topic, t.id, t.board, t.date, t.status {$sqlfields} \nFROM {$db->pre}topics AS t LEFT JOIN {$db->pre}replies AS r ON t.id = r.topic_id \n\tLEFT JOIN {$db->pre}user AS u ON r.name=u.id \n\tLEFT JOIN {$db->pre}forums AS f ON t.board=f.id \n\t{$sqljoin}\nWHERE {$sqlwhere} \nORDER BY {$sqlorder} \nLIMIT {$sqllimit}\n", __LINE__, __FILE__);
// Loop through them if the site is not offline
if ($config['foffline'] == 0) {
    while ($row = $db->fetch_object($result)) {
        // Formats the data
        if ($row->guest == 0) {
            $row->email = $row->umail;
            $row->name = $row->uname;
        } else {
            $row->email = $row->gmail;
            $row->name = $row->gname;
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:external.php


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