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


PHP query::get_object_list方法代码示例

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


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

示例1: get

 public static function get($user_id)
 {
     $q = new query(RUDE_DATABASE_TABLE_SETTINGS);
     $q->where(RUDE_DATABASE_FIELD_USER_ID, (int) $user_id);
     $q->query();
     return $q->get_object_list();
 }
开发者ID:ThisNameWasFree,项目名称:rude-univ,代码行数:7,代码来源:rude-settings.php

示例2: get_by_report

 public static function get_by_report($report_id)
 {
     $q = new query(RUDE_DATABASE_TABLE_EDUCATION_PREVIEW);
     $q->where(RUDE_DATABASE_FIELD_REPORT_ID, (int) $report_id);
     $q->query();
     return $q->get_object_list();
 }
开发者ID:ThisNameWasFree,项目名称:rude-univ,代码行数:7,代码来源:rude-education-preview.php

示例3: get_by_order

 public static function get_by_order($education_id)
 {
     $q = new query(RUDE_DATABASE_TABLE_EDUCATION_ITEMS_VALUES);
     $q->where('education_id', (int) $education_id);
     $q->order_by('order_num', 'ASC');
     $q->query();
     return $q->get_object_list();
 }
开发者ID:ThisNameWasFree,项目名称:rude-univ,代码行数:8,代码来源:rude-education-items-values.php

示例4: get

 public static function get($id = null)
 {
     $q = new query(RUDE_DATABASE_TABLE_REPORTS_CATEGORIES_ITEMS);
     if ($id !== null) {
         $q->where(RUDE_DATABASE_FIELD_ID, (int) $id);
         $q->query();
         return $q->get_object();
     }
     $q->query();
     return $q->get_object_list();
 }
开发者ID:ThisNameWasFree,项目名称:rude-univ,代码行数:11,代码来源:rude-reports-categories-items.php

示例5: get

 public static function get($id = null)
 {
     $q = new query(RUDE_DATABASE_TABLE_CALENDAR_LEGEND);
     if ($id !== null) {
         $q->where(RUDE_DATABASE_FIELD_ID, (int) $id);
         $q->query();
         return $q->get_object();
     }
     $q->query();
     return $q->get_object_list();
 }
开发者ID:ThisNameWasFree,项目名称:rude-univ,代码行数:11,代码来源:rude-calendar-legend.php

示例6: get

 public static function get($id = null)
 {
     $q = new query(RUDE_DATABASE_TABLE_SPECIALIZATIONS);
     if ($id !== null) {
         $q->where(RUDE_DATABASE_FIELD_ID, (int) $id);
         $q->query();
         return $q->get_object();
     }
     $q->order_by(RUDE_DATABASE_FIELD_NAME);
     $q->query();
     return $q->get_object_list();
 }
开发者ID:ThisNameWasFree,项目名称:rude-univ,代码行数:12,代码来源:rude-specializations.php

示例7: get

 public static function get($report_id = null, $year = null)
 {
     $q = new query(RUDE_DATABASE_TABLE_CALENDAR_ITEMS);
     if ($year !== null) {
         $q->where(RUDE_DATABASE_FIELD_YEAR, (int) $year);
     }
     if ($report_id !== null) {
         $q->where(RUDE_DATABASE_FIELD_REPORT_ID, (int) $report_id);
     }
     $q->query();
     return $q->get_object_list();
 }
开发者ID:ThisNameWasFree,项目名称:rude-univ,代码行数:12,代码来源:rude-calendar-items.php

示例8: __construct


//.........这里部分代码省略.........
             $q->query();
             $status = true;
             break;
         case 'delete_item_discipline':
             $q = new dquery(RUDE_DATABASE_TABLE_EDUCATION_ITEMS);
             $q->where('id', (int) get('id'));
             $q->query();
             $status = true;
             break;
         case 'save_education':
             $data = get('data');
             $item_id = get('item_id');
             if (!$data or !$item_id) {
                 return false;
             }
             $education_items = new education_items_values();
             if ($education_items::is_exists($item_id)) {
                 $education_items::remove($item_id);
             }
             $y = 0;
             $id = $item_id[$y];
             foreach ($item_id as $d_id) {
                 $q = new dquery(RUDE_DATABASE_TABLE_EDUCATION_ITEMS_VALUES);
                 $q->where('item_id', $d_id);
                 $q->query();
             }
             $col_num = 1;
             foreach ($data as $item) {
                 if ($item != '') {
                     $education_items::add($id, $item, $col_num);
                 }
                 if ($col_num == 40) {
                     $col_num = 0;
                     $id = $item_id[$y + 1];
                     $y++;
                 }
                 $col_num++;
             }
             //debug($data);
             $status = true;
             break;
         case 'add_education':
             $tmp = education::add(get('report_id'), get('name'));
             $status = true;
             die(json_encode($tmp));
             break;
         case 'remove_education':
             education::remove(get('id'));
             break;
         case 'add_education_item':
             $tmp = education_items::add(get('education_id'), get('name'), get('order'));
             $status = true;
             die(json_encode($tmp));
             break;
         case 'copy_education':
             $education = education::get(get('dis_id'));
             $q = new cquery(RUDE_DATABASE_TABLE_EDUCATION_PREVIEW);
             $q->add('report_id', (int) get('report_id'));
             $q->add('name', $education->name);
             $q->query();
             $new_id = $q->get_id();
             $q = new query(RUDE_DATABASE_TABLE_EDUCATION_ITEMS);
             $q->where('education_id', (int) get('dis_id'));
             $q->query();
             $all_dis = $q->get_object_list();
             foreach ($all_dis as $cur_dis) {
                 $q = new cquery(RUDE_DATABASE_TABLE_EDUCATION_ITEMS_PREVIEW);
                 $q->add('name', $cur_dis->name);
                 $q->add('education_id', $new_id);
                 $q->add('order_num', $cur_dis->order_num);
                 $q->add('is_optional', $cur_dis->is_optional);
                 $q->query();
                 $new_item_id = $q->get_id();
                 $q = new query(RUDE_DATABASE_TABLE_EDUCATION_ITEMS_VALUES);
                 $q->where('item_id', $cur_dis->id);
                 $q->query();
                 $all_item_val = $q->get_object_list();
                 foreach ($all_item_val as $cur_item_val) {
                     $q = new cquery(RUDE_DATABASE_TABLE_EDUCATION_ITEMS_VALUES_PREVIEW);
                     $q->add('value', $cur_item_val->value);
                     $q->add('item_id', $new_item_id);
                     $q->add('col_num', $cur_item_val->col_num);
                     $q->query();
                 }
             }
             $status = true;
             break;
         default:
             $status = false;
             break;
     }
     if (get('ajax')) {
         if ($status) {
             exit(RUDE_AJAX_OK);
         } else {
             exit(RUDE_AJAX_ERROR);
         }
     }
     return true;
 }
开发者ID:wild-stas,项目名称:rude-univ,代码行数:101,代码来源:rude-template-reports-edit.php


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