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


PHP mssql_next_result函数代码示例

本文整理汇总了PHP中mssql_next_result函数的典型用法代码示例。如果您正苦于以下问题:PHP mssql_next_result函数的具体用法?PHP mssql_next_result怎么用?PHP mssql_next_result使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: query

 public static function query($queryStr = '', $objectStr = '')
 {
     $queryDB = mssql_query(self::$dbConnect, $queryStr);
     if (preg_match('/insert into/i', $queryDB)) {
         mssql_next_result($queryDB);
         $row = mssql_fetch_row($queryDB);
         self::$insertID = $row[0];
     }
     if (is_object($objectStr)) {
         $objectStr($queryDB);
     }
     return $queryDB;
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:13,代码来源:DatabaseMSSQL.php

示例2: nextResult

 /**
  * Move the internal result pointer to the next available result
  *
  * @return true on success, false if there is no more result set or an error object on failure
  * @access public
  */
 function nextResult()
 {
     if ($this->result === false) {
         return $this->db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null, 'resultset has already been freed', __FUNCTION__);
     } elseif (is_null($this->result)) {
         return false;
     }
     return @mssql_next_result($this->result);
 }
开发者ID:ajisantoso,项目名称:kateglo,代码行数:15,代码来源:mssql.php

示例3: getMoreResults

 /**
  * @see CallableStatement::getMoreResults()
  */
 function getMoreResults()
 {
     $this->rsFetchCount++;
     // we track this because
     $hasMore = mssql_next_result($this->result);
     if ($this->resultSet) {
         $this->resultSet->close();
     }
     if ($hasMore) {
         $clazz = $this->resultClass;
         $this->resultSet = new $clazz($this, $this->result);
     } else {
         $this->resultSet = null;
     }
     return $hasMore;
 }
开发者ID:taryono,项目名称:school,代码行数:19,代码来源:MSSQLCallableStatement.php

示例4: nextResult

 /**
  * Move the internal result pointer to the next available result
  * Currently not supported
  *
  * @return true if a result is available otherwise return false
  * @access public
  */
 function nextResult()
 {
     if (is_null($this->result)) {
         return $this->mdb->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null, 'nextResult: resultset has already been freed');
     }
     return @mssql_next_result($this->result);
 }
开发者ID:GeekyNinja,项目名称:LifesavingCAD,代码行数:14,代码来源:mssql.php

示例5: sqlReport

 public function sqlReport($sQuery)
 {
     if (!preg_match('/^SELECT/', $sQuery)) {
         return '';
     }
     $bTable = false;
     $sHtml = '';
     @mssql_query('SET SHOWPLAN_TEXT ON;', $this->_hMaster);
     if ($hResult = @mssql_query($sQuery, $this->_hMaster)) {
         @mssql_next_result($hResult);
         while ($aRow = @mssql_fetch_row($hResult)) {
             list($bTable, $sData) = Phpfox_Debug::addRow($bTable, $aRow);
             $sHtml .= $sData;
         }
     }
     @mssql_query('SET SHOWPLAN_TEXT OFF;', $this->_hMaster);
     @mssql_free_result($hResult);
     if ($bTable) {
         $sHtml .= '</table>';
     }
     return $sHtml;
 }
开发者ID:googlesky,项目名称:snsp.vn,代码行数:22,代码来源:mssql.class.php

示例6: nextRecord

 /**
  * 把查询数据库的指针移到下一条记录
  * 
  * @return array
  */
 function nextRecord()
 {
     $this->Record = array();
     mssql_next_result($this->queryId);
     $this->Record = mssql_fetch_array($this->queryId);
     $result = $this->Record;
     if (!is_array($result)) {
         return $this->Record;
     }
     foreach ($result as $key => $value) {
         $keylower = strtolower($key);
         if ($keylower != $key) {
             $this->Record[$keylower] = $value;
         }
     }
     return $this->Record;
 }
开发者ID:noikiy,项目名称:zays,代码行数:22,代码来源:MooMsSQL.class.php

示例7: exeStoredProc

 /**
  * method to deal with the execution of MS SQL stored proceedured
  * @param $string $procName The name of the proceedure to execute
  * @param array $paramArray An array containing entries for each paramneeded but the stored proceedure see the exampel in the code below
  */
 function exeStoredProc($procName, $paramArray = false, $skip_results = false)
 {
     // example param array
     // $paramArray = array ('LocationName' => array ('VALUE' => 'the clients host name', 'TYPE' => 'SQLVARCHAR', 'ISOUTPUT' => 'false', 'IS_NULL' =>'false', 'MAXLEN' => '255' ) );
     // each element in the paramArray must idetify a paramiter required by the stored proceedure and can tain an array of settings from that paramiter
     // see http://php.net/manual/en/function.mssql-bind.php for information on the values for these paramiters
     // initiate the stored proceedure
     $stmt = mssql_init($procName, $this->linkid);
     // bind paramiters
     if ($paramArray) {
         foreach ($paramArray as $paramName => $values) {
             mssql_bind($stmt, $paramName, $values['VALUE'], $values['TYPE'], $values['ISOUTPUT'], $values['IS_NULL'], $values['MAXLEN']);
         }
     }
     // execute the stored proceedure
     $results = mssql_execute($stmt);
     // if we do not get anu results return false
     if (!$results) {
         return false;
         // if we get results then put them in to an array and return it
     } else {
         // define the array to return
         $resultArray = array();
         // loop throught he result set and place each result to the resultArray
         do {
             while ($row = mssql_fetch_row($stmt)) {
                 $resultArray[] = $row;
             }
         } while (mssql_next_result($stmt));
         // clean up the statment ready for the next useexec SELLING_GetLocation @LocationName='it-leigh.skilouise.com'
         mssql_free_statement($stmt);
         //returnt he result array
         return $resultArray;
     }
 }
开发者ID:exaflo,项目名称:appli,代码行数:40,代码来源:class.mssql.php

示例8: NextRecordSet

 function NextRecordSet()
 {
     if (!mssql_next_result($this->_queryID)) {
         return false;
     }
     $this->_inited = false;
     $this->bind = false;
     $this->_currentRow = -1;
     $this->Init();
     return true;
 }
开发者ID:johnfelipe,项目名称:orfeo,代码行数:11,代码来源:adodb-mssql.inc.php

示例9: nextResult

 /**
  * Move the internal result pointer to the next result
  * 
  * @param	resource	$statement - The result resource that is being evaluated.
  * @return	boolean
  */
 public function nextResult($statement)
 {
     if (!is_resource($statement)) {
         throw new LikePDOException("There is no active statement");
         return false;
     } else {
         return mssql_next_result($statement);
     }
 }
开发者ID:erickmcarvalho,项目名称:likepdo,代码行数:15,代码来源:MssqlDriver.php

示例10: GetResults

 function GetResults()
 {
     $out = array();
     do {
         while ($row = mssql_fetch_assoc($this->Result)) {
             $out[] = $row;
         }
     } while (mssql_next_result($this->Result));
     return $out;
 }
开发者ID:michalkoczwara,项目名称:WebGoatPHP,代码行数:10,代码来源:mssql.php

示例11: nextRecord

 /**
  * 把查询数据库的指针移到下一条记录
  *
  * @return array
  */
 public function nextRecord()
 {
     mssql_next_result($this->queryId);
     return mssql_fetch_array($this->queryId);
 }
开发者ID:GameCrusherTechnology,项目名称:HeroTowerServer,代码行数:10,代码来源:MooMsSQL.class.php

示例12: mssql_query

SET @limit = 20
SET @offset = 4
OPEN Search
FETCH ABSOLUTE @offset FROM Search
WHILE @@FETCH_STATUS =0 AND @limit > 1
BEGIN
  FETCH NEXT FROM Search
  SET @limit = @limit -1
END
CLOSE Search
DEALLOCATE Search
EOSQL;
$num_rows = 0;
$res = mssql_query($sql) or die("query");
$row = mssql_fetch_assoc($res);
while ($row) {
    ++$num_rows;
    //  print_r($row);
    echo "got a row, name is {$row['name']}\n";
    $row = mssql_fetch_assoc($res);
    if (!$row) {
        if (mssql_next_result($res)) {
            $row = mssql_fetch_assoc($res);
        }
    }
}
if ($num_rows < 2) {
    echo "Expected more than a row\n";
    exit(1);
}
exit(0);
开发者ID:johnnyzhong,项目名称:freetds,代码行数:31,代码来源:nextres.php

示例13: next_result

 /**
  * 向下移动一个数据集 Move the internal result pointer to the next result
  *
  * @return boolean The function will return TRUE if an additional result set was available or FALSE otherwise.
  */
 public function next_result()
 {
     if (!is_resource($this->result)) {
         return false;
     }
     mssql_next_result($this->result);
 }
开发者ID:laiello,项目名称:hecart,代码行数:12,代码来源:mssql.php

示例14: nextRowset

 /**
  * Retrieves the next rowset (result set) for a SQL statement that has
  * multiple result sets.  An example is a stored procedure that returns
  * the results of multiple queries.
  *
  * @return bool
  * @throws Zend_Db_Statement_Exception
  */
 public function nextRowset()
 {
     if (mssql_next_result($this->_result) === false) {
         throw new Zend_Db_Statement_Exception(mssql_get_last_message());
     }
     // reset column keys
     $this->_keys = null;
     return true;
 }
开发者ID:diglin,项目名称:diglin_mssql,代码行数:17,代码来源:Mssql.php

示例15: func_mssql_query

function func_mssql_query($query, $sess, &$bin, &$biVal, &$biLen, &$biRes, &$biType)
{
    if (count($bin) >= 1) {
        $res = mssql_init($query);
        for ($i = 0; $i < count($bin); $i++) {
            $TypeParam = TRUE;
            $biRes[$i] = $biVal[$i];
            if ($biLen[$i] == -1) {
                $TypeParam = FALSE;
            }
            if ($biType[$i] == 1) {
                $msType = SQLVARCHAR;
            }
            if ($biType[$i] == 2) {
                $msType = SQLINT4;
            }
            if ($biType[$i] == 3) {
                $msType = SQLFLT8;
            }
            if ($biType[$i] == 4) {
                $msType = SQLVARCHAR;
            }
            mssql_bind($res, $bin[$i], $biRes[$i], $msType, $TypeParam);
        }
        $resExec = mssql_execute($res);
        while (mssql_next_result($resExec)) {
        }
    } else {
        $resExec = mssql_query($query);
        if (!$resExec) {
            ErreurExecutionMSSQL();
        }
    }
    return $resExec;
}
开发者ID:EliosIT,项目名称:PS_AchatFilet,代码行数:35,代码来源:connect.php


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