本文整理匯總了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;
}