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


PHP ADORecordSet::MoveNext方法代码示例

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


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

示例1: _getObjectsFromResult

 /**
  * @param ADORecordSet $rs
  * @return Model_WgmGoogleCse[]
  */
 private static function _getObjectsFromResult($rs)
 {
     $objects = array();
     while (!$rs->EOF) {
         $object = new Model_WgmGoogleCse();
         $object->id = $rs->fields['id'];
         $object->name = $rs->fields['name'];
         $object->url = $rs->fields['url'];
         $object->token = $rs->fields['token'];
         $objects[$object->id] = $object;
         $rs->MoveNext();
     }
     return $objects;
 }
开发者ID:joegeck,项目名称:cerb4,代码行数:18,代码来源:App.php

示例2: getNextByLoadId

 /**
  * Get next temporary stats record by load id.
  * @param $loadId string
  * @return mixed array or false if the end of
  * records is reached.
  */
 function getNextByLoadId($loadId)
 {
     if (!$this->_result || $this->_loadId != $loadId) {
         $this->_result = $this->_getGrouped($loadId);
         $this->_loadId = $loadId;
     }
     if ($this->_result->EOF) {
         return false;
     }
     $row = $this->_result->GetRowAssoc(false);
     $this->_result->MoveNext();
     return $row;
 }
开发者ID:laelnasan,项目名称:UTFPR-ojs,代码行数:19,代码来源:UsageStatsTemporaryRecordDAO.inc.php

示例3: db_fetch_array

/**
 * Retrieve the next row returned from a specific database query
 * @param bool|ADORecordSet $p_result Database Query Record Set to retrieve next result for.
 * @return array Database result
 */
function db_fetch_array(&$p_result)
{
    global $g_db, $g_db_type;
    if ($p_result->EOF) {
        return false;
    }
    # mysql obeys FETCH_MODE_BOTH, hence ->fields works, other drivers do not support this
    if ($g_db_type == 'mysql' || $g_db_type == 'odbc_mssql' || $g_db_type == 'mssqlnative') {
        $t_array = $p_result->fields;
        $p_result->MoveNext();
        return $t_array;
    } else {
        $t_row = $p_result->GetRowAssoc(false);
        static $t_array_result;
        static $t_array_fields;
        if ($t_array_result != $p_result) {
            // new query
            $t_array_result = $p_result;
            $t_array_fields = null;
        } else {
            if ($t_array_fields === null) {
                $p_result->MoveNext();
                return $t_row;
            }
        }
        $t_convert = false;
        $t_fieldcount = $p_result->FieldCount();
        for ($i = 0; $i < $t_fieldcount; $i++) {
            if (isset($t_array_fields[$i])) {
                $t_field = $t_array_fields[$i];
            } else {
                $t_field = $p_result->FetchField($i);
                $t_array_fields[$i] = $t_field;
            }
            switch ($t_field->type) {
                case 'bool':
                    switch ($t_row[$t_field->name]) {
                        case 'f':
                            $t_row[$t_field->name] = false;
                            break;
                        case 't':
                            $t_row[$t_field->name] = true;
                            break;
                    }
                    $t_convert = true;
                    break;
                default:
                    break;
            }
        }
        if ($t_convert == false) {
            $t_array_fields = null;
        }
        $p_result->MoveNext();
        return $t_row;
    }
}
开发者ID:Tarendai,项目名称:spring-website,代码行数:62,代码来源:database_api.php

示例4: _getObjectsFromResult

 /**
  * @param ADORecordSet $rs
  * @return Model_WatcherMailFilter[]
  */
 private static function _getObjectsFromResult($rs)
 {
     $objects = array();
     while (!$rs->EOF) {
         $object = new Model_WatcherMailFilter();
         $object->id = $rs->fields['id'];
         $object->pos = $rs->fields['pos'];
         $object->name = $rs->fields['name'];
         $object->created = $rs->fields['created'];
         $object->is_disabled = intval($rs->fields['is_disabled']);
         $object->worker_id = intval($rs->fields['worker_id']);
         if (null != @($criteria_ser = $rs->fields['criteria_ser'])) {
             if (false === @($object->criteria = unserialize($criteria_ser))) {
                 $object->criteria = array();
             }
         }
         if (null != @($actions_ser = $rs->fields['actions_ser'])) {
             if (false === ($object->actions = unserialize($actions_ser))) {
                 $object->actions = array();
             }
         }
         $objects[$object->id] = $object;
         $rs->MoveNext();
     }
     return $objects;
 }
开发者ID:Hildy,项目名称:cerb5,代码行数:30,代码来源:App.php

示例5: _getObjectsFromResultSet

 private static function _getObjectsFromResultSet(ADORecordSet $rs)
 {
     $objects = array();
     while (!$rs->EOF) {
         $tag = new CloudGlueTag();
         $tag->id = intval($rs->fields['id']);
         $tag->name = $rs->fields['name'];
         $objects[$tag->id] = $tag;
         $rs->MoveNext();
     }
     return $objects;
 }
开发者ID:sluther,项目名称:portsensor,代码行数:12,代码来源:DAO.php

示例6: _createObjectsFromResultSet

 private static function _createObjectsFromResultSet(ADORecordSet $rs)
 {
     $db = DevblocksPlatform::getDatabaseService();
     $objects = array();
     if ($rs instanceof ADORecordSet) {
         while (!$rs->EOF) {
             $object = new Model_CustomField();
             $object->id = intval($rs->fields['id']);
             $object->name = $rs->fields['name'];
             $object->type = $rs->fields['type'];
             $object->source_extension = $rs->fields['source_extension'];
             $object->group_id = intval($rs->fields['group_id']);
             $object->pos = intval($rs->fields['pos']);
             $object->options = DevblocksPlatform::parseCrlfString($rs->fields['options']);
             $objects[$object->id] = $object;
             $rs->MoveNext();
         }
     }
     return $objects;
 }
开发者ID:jsjohnst,项目名称:cerb4,代码行数:20,代码来源:DAO.class.php

示例7: recordset_to_menu

/**
 * Utility function used by the following 3 methods.
 *
 * @param ADORecordSet $rs an ADODB RecordSet object with two columns.
 * @return mixed an associative array, or false if an error occurred or the RecordSet was empty.
 * @access private
 */
function recordset_to_menu(ADORecordSet $rs)
{
    global $CFG;
    if ($rs && $rs->RecordCount() > 0) {
        $keys = array_keys($rs->fields);
        $key0 = $keys[0];
        if (isset($keys[1])) {
            $key1 = $keys[1];
        } else {
            $key1 = $keys[0];
        }
        while (!$rs->EOF) {
            $menu[$rs->fields[$key0]] = $rs->fields[$key1];
            $rs->MoveNext();
        }
        return $menu;
    } else {
        return false;
    }
}
开发者ID:vohung96,项目名称:mahara,代码行数:27,代码来源:dml.php

示例8: _getObjectsFromResult

 /**
  * @param ADORecordSet $rs
  * @return Model_WebapiKey[]
  */
 private static function _getObjectsFromResult($rs)
 {
     $objects = array();
     while (!$rs->EOF) {
         $object = new Model_WebapiKey();
         $object->id = intval($rs->fields['id']);
         $object->nickname = $rs->fields['nickname'];
         $object->access_key = $rs->fields['access_key'];
         $object->secret_key = $rs->fields['secret_key'];
         $rights = $rs->fields['rights'];
         if (!empty($rights)) {
             @($object->rights = unserialize($rights));
         }
         $objects[$object->id] = $object;
         $rs->MoveNext();
     }
     return $objects;
 }
开发者ID:sluther,项目名称:portsensor,代码行数:22,代码来源:Rest.php

示例9: _getObjectsFromResult

 /**
  * @param ADORecordSet $rs
  * @return Model_Feed[]
  */
 private static function _getObjectsFromResult($rs)
 {
     $objects = array();
     while (!$rs->EOF) {
         $object = new Model_Feed();
         $object->id = $rs->fields['id'];
         $object->guid = $rs->fields['guid'];
         $object->name = $rs->fields['name'];
         $object->secret_key = $rs->fields['secret_key'];
         $objects[$object->id] = $object;
         $rs->MoveNext();
     }
     return $objects;
 }
开发者ID:sluther,项目名称:portsensor,代码行数:18,代码来源:DAO.class.php

示例10: switch

 /**
  * Move to the next row in the results set
  *
  * Specifying a fetch_mode only works for newly fetched rows, the first row always gets fetched by query!!!
  *
  * @deprecated use foreach(query() or foreach(select() to loop over the query using the global db object
  * @param int $fetch_mode egw_db::FETCH_BOTH = numerical+assoc keys (eGW default), egw_db::FETCH_ASSOC or egw_db::FETCH_NUM
  * @return bool was another row found?
  */
 function next_record($fetch_mode = egw_db::FETCH_BOTH)
 {
     if (!$this->Query_ID) {
         $this->halt('next_record called with no query pending.');
         return 0;
     }
     if ($this->Row) {
         $this->Query_ID->MoveNext();
     }
     ++$this->Row;
     $this->Record = $this->Query_ID->fields;
     if ($this->Query_ID->EOF || !$this->Query_ID->RecordCount() || !is_array($this->Record)) {
         return False;
     }
     if ($this->capabilities['name_case'] == 'upper') {
         switch ($fetch_mode) {
             case egw_db::FETCH_ASSOC:
                 $this->Record = array_change_key_case($this->Record);
                 break;
             case egw_db::FETCH_NUM:
                 $this->Record = array_values($this->Record);
                 break;
             default:
                 $this->Record = array_change_key_case($this->Record);
                 if (!isset($this->Record[0])) {
                     $this->Record += array_values($this->Record);
                 }
                 break;
         }
     } elseif ($this->adodb->fetchMode != $fetch_mode) {
         if (!isset($this->Record[0])) {
             $this->Record += array_values($this->Record);
         }
     }
     return True;
 }
开发者ID:HaakonME,项目名称:porticoestate,代码行数:45,代码来源:class.egw_db.inc.php

示例11: _getObjectsFromResult

 /**
  * @param ADORecordSet $rs
  * @return Model_DevblocksTemplate[]
  */
 private static function _getObjectsFromResult($rs)
 {
     $objects = array();
     while (!$rs->EOF) {
         $object = new Model_DevblocksTemplate();
         $object->id = $rs->fields['id'];
         $object->plugin_id = $rs->fields['plugin_id'];
         $object->path = $rs->fields['path'];
         $object->tag = $rs->fields['tag'];
         $object->last_updated = $rs->fields['last_updated'];
         $object->content = $rs->fields['content'];
         $objects[$object->id] = $object;
         $rs->MoveNext();
     }
     return $objects;
 }
开发者ID:Hildy,项目名称:devblocks,代码行数:20,代码来源:DAO.php


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