本文整理汇总了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;
}
示例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();
示例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;
}