當前位置: 首頁>>代碼示例>>PHP>>正文


PHP mssql_field_seek函數代碼示例

本文整理匯總了PHP中mssql_field_seek函數的典型用法代碼示例。如果您正苦於以下問題:PHP mssql_field_seek函數的具體用法?PHP mssql_field_seek怎麽用?PHP mssql_field_seek使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了mssql_field_seek函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: list_fields

 /**
  * Fetch Field Names
  *
  * Generates an array of column names
  *
  * @return	array
  */
 public function list_fields()
 {
     $field_names = array();
     mssql_field_seek($this->result_id, 0);
     while ($field = mssql_fetch_field($this->result_id)) {
         $field_names[] = $field->name;
     }
     return $field_names;
 }
開發者ID:nuit-de-l-info,項目名稱:2015-ndl-jj,代碼行數:16,代碼來源:mssql_result.php

示例2: Conexion

<?php

include '../header.php';
$db = new Conexion();
$link = Conectarse();
$Ot = $_POST['ot'];
$Horainicio = $_POST['horainicio'];
$Horafin = $_POST['horafin'];
$date = new DateTime($_POST['fecha']);
$Fecha = $date->format('Y-m-d');
$HorasTrabajo = $Horafin - $horainicio;
$Horashombre = (floatval($Horafin) - floatval($Horainicio)) / 60;
/*1. Obtener el centro de costo de la ot*/
$sql = "SELECT  CODIGOCENTROCOSTO,CODIGOOT\n\tFROM [020BDCOMUN].DBO.CENCOSOT  WHERE\n\tCODIGOOT IN (SELECT OF_COD FROM [011BDCOMUN].DBO.ORD_FAB\n WHERE OF_ESTADO='ACTIVO') AND CODIGOOT='{$Ot}'";
$result = mssql_query($sql, $link);
if ($row = mssql_fetch_array($result)) {
    mssql_field_seek($result, 0);
    while ($field = mssql_fetch_field($result)) {
    }
    do {
        $Cencos = $row['CODIGOCENTROCOSTO'];
    } while ($row = mssql_fetch_array($result));
} else {
    echo "error";
}
$reporte = new Reporte($_POST['id'], $Fecha, $DescHorainicio, $DescHorafin, $HorasTrabajo, $_POST['detalle'], $Horashombre, $Ot, $Cencos, $_SESSION['id'], $_POST['proceso'], $_POST['clasificacion']);
$reporte->Actualizar();
開發者ID:Overprime,項目名稱:admin-control-de-fabricacion,代碼行數:27,代碼來源:registrar-reporte.php

示例3: GetColumnNames

 function GetColumnNames($result, &$column_names)
 {
     $result_value = intval($result);
     if (!isset($this->highest_fetched_row[$result_value])) {
         return $this->SetError("Get column names", "it was specified an inexisting result set");
     }
     if (!isset($this->columns[$result_value])) {
         $this->columns[$result_value] = array();
         for ($column = 0; @mssql_field_seek($result, $column); $column++) {
             $field = mssql_fetch_field($result);
             $this->columns[$result_value][strtolower($field->name)] = $column;
         }
     }
     $column_names = $this->columns[$result_value];
     return 1;
 }
開發者ID:BackupTheBerlios,項目名稱:zvs,代碼行數:16,代碼來源:metabase_mssql.php


注:本文中的mssql_field_seek函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。