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


PHP SJB_DB::table_exists方法代码示例

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


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

示例1: deleteObjectInfoFromDB

 public static function deleteObjectInfoFromDB($db_table_name, $object_sid)
 {
     if (SJB_DB::table_exists($db_table_name . '_properties')) {
         if (SJB_DB::query('DELETE FROM ?w WHERE object_sid = ?n', $db_table_name . '_properties', $object_sid)) {
             return SJB_DB::query('DELETE FROM ?w WHERE sid = ?n', $db_table_name, $object_sid);
         }
         return false;
     }
     return SJB_DB::query('DELETE FROM ?w WHERE sid = ?n', $db_table_name, $object_sid);
 }
开发者ID:Maxlander,项目名称:shixi,代码行数:10,代码来源:ObjectDBManager.php

示例2: _getFromStatement

 function _getFromStatement($inner_join = false)
 {
     $sql = '';
     $inner = '';
     if (!empty($inner_join)) {
         foreach ($inner_join as $key => $val) {
             if (str_replace('_2second', '', $key)) {
                 $as = $key;
                 $table = str_replace('_2second', '', $key);
             }
             if (isset($val['sort_field']) && !isset($val['noPresix'])) {
                 $sql .= ", `{$key}`.{$val['sort_field']} ";
             } elseif (isset($val['select_field'])) {
                 $sql .= ", `{$key}`.{$val['select_field']} ";
             }
             if (isset($val['count'])) {
                 $sql .= ", {$val['count']} ";
             }
             if (isset($val['main_table'])) {
                 if (isset($as)) {
                     $inner .= $val['join'] . " `{$table}` as {$as} ON `{$as}`.{$val['join_field']} = `{$this->object_table_prefix}`.{$val['join_field2']} ";
                 } else {
                     $inner .= $val['join'] . " `{$key}`  ON `{$key}`.{$val['join_field']} = `{$this->object_table_prefix}`.{$val['join_field2']} ";
                 }
             }
         }
     }
     if (SJB_DB::table_exists($this->object_table_prefix . '_properties') && ($this->isComplex || $this->isMonetary)) {
         $from_block = "FROM `{$this->object_table_prefix}` INNER JOIN `{$this->object_table_prefix}_properties` ON `{$this->object_table_prefix}`.`sid` = `{$this->object_table_prefix}_properties`.`object_sid` ";
     } else {
         $from_block = "FROM `{$this->object_table_prefix}` ";
     }
     return $sql . $from_block . '  ' . $inner;
 }
开发者ID:Maxlander,项目名称:shixi,代码行数:34,代码来源:SearchSqlTranslator.php

示例3: deleteProfileSocialInfoByReference

 public static function deleteProfileSocialInfoByReference($reference)
 {
     $some = explode('_', $reference);
     $network = SJB_Array::get($some, 0);
     if ($network) {
         $fieldID = $network . '_id';
         $id = explode($network . '_', $reference);
         $id = SJB_Array::get($id, 1);
         if (SJB_DB::table_exists($network)) {
             SJB_DB::query('DELETE FROM `?w` WHERE `?w` = ?s', $network, $fieldID, $id);
         }
     }
 }
开发者ID:Maxlander,项目名称:shixi,代码行数:13,代码来源:SocialPlugin.php


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