• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP mssql_next_result函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: mssql_init

$num_res = 0;
$stmt = mssql_init("sp_php_test", $conn);
$rs = mssql_execute($stmt);
if (is_resource($rs)) {
    echo "fetching...\n";
    do {
        ++$num_res;
        echo "Processing result {$num_res}\n";
        echo "Num rows = " . mssql_num_rows($rs) . "\n";
        if (!$err && $num_res == 1 && mssql_num_rows($rs) != 0) {
            $err = "Expected 0 rows from recordset {$num_res}";
        }
        if (!$err && $num_res == 2 && mssql_num_rows($rs) != 2) {
            $err = "Expected 2 rows from recordset {$num_res}";
        }
        // Process result
    } while (mssql_next_result($rs));
    mssql_free_result($rs);
}
if (!$err && $num_res != 2) {
    $err = "Expected 2 resultset got {$num_res}";
}
# cleanup
mssql_query("drop proc sp_php_test");
mssql_query("drop table php_test");
mssql_close($conn);
if ($err) {
    echo "{$err}\n";
    exit(1);
}
exit(0);
开发者ID:johnnyzhong,项目名称:freetds,代码行数:31,代码来源:rpc1.php


示例17: _sql_report

 /**
  * Build db-specific report
  * @access private
  */
 function _sql_report($mode, $query = '')
 {
     switch ($mode) {
         case 'start':
             $html_table = false;
             @mssql_query('SET SHOWPLAN_TEXT ON;', $this->db_connect_id);
             if ($result = @mssql_query($query, $this->db_connect_id)) {
                 @mssql_next_result($result);
                 while ($row = @mssql_fetch_row($result)) {
                     $html_table = $this->sql_report('add_select_row', $query, $html_table, $row);
                 }
             }
             @mssql_query('SET SHOWPLAN_TEXT OFF;', $this->db_connect_id);
             @mssql_free_result($result);
             if ($html_table) {
                 $this->html_hold .= '</table>';
             }
             break;
         case 'fromcache':
             $endtime = explode(' ', microtime());
             $endtime = $endtime[0] + $endtime[1];
             $result = @mssql_query($query, $this->db_connect_id);
             while ($void = @mssql_fetch_assoc($result)) {
                 // Take the time spent on parsing rows into account
             }
             @mssql_free_result($result);
             $splittime = explode(' ', microtime());
             $splittime = $splittime[0] + $splittime[1];
             $this->sql_report('record_fromcache', $query, $endtime, $splittime);
             break;
     }
 }
开发者ID:jambik,项目名称:elenaburgon,代码行数:36,代码来源:mssql.php


示例18: array

 /**
  * return the result of the last query.
  * @param mixed $idname if $idname is false keys are simply incrementing from 0, if $idname is string the key is the value of the column specified in the string
  */
 private function &lastResult($idnames = false)
 {
     do {
         $result = array();
         if (@mssql_num_rows($this->result) > 0) {
             if ($idnames === false) {
                 while ($row = mssql_fetch_assoc($this->result)) {
                     $result[] = $row;
                 }
             } else {
                 while ($row = mssql_fetch_assoc($this->result)) {
                     $current =& $result;
                     foreach ($idnames as $idname) {
                         if (!array_key_exists($idname, $row)) {
                             throw new InvalidArgumentException('Cant order result by a field thats not in the resultset (forgot to select it?)');
                         }
                         if ($row[$idname] === null) {
                             $row[$idname] = 'null';
                         }
                         $current =& $current[$row[$idname]];
                     }
                     $current = $row;
                 }
                 //while
             }
             //idnames!=false
         }
         //num_rows>0
     } while (mssql_next_result($this->result));
     return $result;
 }
开发者ID:emente,项目名称:kataii---kata-framework-2.x,代码行数:35,代码来源:dbo_mssql.php


示例19: nextResult

 /**
  * Move the internal mssql result pointer to the next available result
  *
  * @param a valid fbsql result resource
  *
  * @access public
  *
  * @return true if a result is available otherwise return false
  */
 function nextResult($result)
 {
     return @mssql_next_result($result);
 }
开发者ID:fathitarek,项目名称:cop5725-dbms-project,代码行数:13,代码来源:mssql.php


示例20: _sql_report

 /**
  * Build db-specific report
  * @access: private
  */
 function _sql_report($mode, $query = '')
 {
     switch ($mode) {
         case 'start':
             $explain_query = $query;
             if (preg_match('/UPDATE ([a-z0-9_]+).*?WHERE(.*)/s', $query, $m)) {
                 $explain_query = 'SELECT * FROM ' . $m[1] . ' WHERE ' . $m[2];
             } else {
                 if (preg_match('/DELETE FROM ([a-z0-9_]+).*?WHERE(.*)/s', $query, $m)) {
                     $explain_query = 'SELECT * FROM ' . $m[1] . ' WHERE ' . $m[2];
                 }
             }
             if (preg_match('/^SELECT/', $explain_query)) {
                 $html_table = false;
                 @mssql_query("SET SHOWPLAN_TEXT ON;", $this->db_connect_id);
                 if ($result = @mssql_query($explain_query, $this->db_connect_id)) {
                     @mssql_next_result($result);
                     while ($row = @mssql_fetch_row($result)) {
                         $html_table = $this->sql_report('add_select_row', $query, $html_table, $row);
                     }
                 }
                 @mssql_query("SET SHOWPLAN_TEXT OFF;", $this->db_connect_id);
                 @mssql_free_result($result);
                 if ($html_table) {
                     $this->html_hold .= '</table>';
                 }
             }
             break;
         case 'fromcache':
             $endtime = explode(' ', microtime());
             $endtime = $endtime[0] + $endtime[1];
             $result = @mssql_query($query, $this->db_connect_id);
             while ($void = @mssql_fetch_assoc($result)) {
                 // Take the time spent on parsing rows into account
             }
             @mssql_free_result($result);
             $splittime = explode(' ', microtime());
             $splittime = $splittime[0] + $splittime[1];
             $this->sql_report('record_fromcache', $query, $endtime, $splittime);
             break;
     }
 }
开发者ID:yunsite,项目名称:gloryroad,代码行数:46,代码来源:mssql.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP mssql_num_fields函数代码示例发布时间:2022-05-15
下一篇:
PHP mssql_min_message_severity函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap