当前位置: 首页>>代码示例>>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;未经允许,请勿转载。