ocicolumnsize
<<<
ocicolumntype ocicolumntyperaw
>>>

8.85 Oracle 8
8 Référence des fonctions
 Manuel PHP

Introduction
Pré-requis
Installation
Configuration à l'exécution
Types de ressources
Constantes pré-définies
Exemples
oci_bind_by_name
oci_cancel
oci_close
OCI-Collection->append
OCI-Collection->assign
OCI-Collection->assignElem
OCI-Collection->getElem
OCI-Collection->free
OCI-Collection->max
OCI-Collection->size
OCI-Collection->trim
oci_commit
oci_connect
oci_define_by_name
oci_error
oci_execute
oci_fetch_all
oci_fetch_array
oci_fetch_assoc
oci_fetch_object
oci_fetch_row
oci_fetch
oci_field_is_null
oci_field_name
oci_field_precision
oci_field_scale
oci_field_size
oci_field_type_raw
oci_field_type
descriptor->free
oci_free_statement
oci_internal_debug
lob->append
lob->close
oci_lob_copy
lob->eof
lob->erase
lob->export
lob->flush
lob->import
oci_lob_is_equal
lob->load
lob->read
lob->rewind
lob->save
lob->seek
lob->size
lob->tell
lob->truncate
lob->writeTemporary
lob->write
oci_new_collection
oci_new_connect
oci_new_cursor
oci_new_descriptor
oci_num_fields
oci_num_rows
oci_parse
oci_password_change
oci_pconnect
oci_result
oci_rollback
oci_server_version
oci_set_prefetch
oci_statement_type
ocibindbyname
ocicancel
ocicloselob
ocicollappend
ocicollassign
ocicollassignelem
ocicollgetelem
ocicollmax
ocicollsize
ocicolltrim
ocicolumnisnull
ocicolumnname
ocicolumnprecision
ocicolumnscale
ocicolumnsize
->ocicolumntype
ocicolumntyperaw
ocicommit
ocidefinebyname
ocierror
ociexecute
ocifetch
ocifetchinto
ocifetchstatement
ocifreecollection
ocifreecursor
ocifreedesc
ocifreestatement
lob->getBuffering
ociinternaldebug
ociloadlob
ocilogoff
ocilogon
ocinewcollection
ocinewcursor
ocinewdescriptor
ocinlogon
ocinumcols
ociparse
ociplogon
ociresult
ocirollback
ocirowcount
ocisavelob
ocisavelobfile
ociserverversion
lob->setBuffering
ocisetprefetch
ocistatementtype
ociwritelobtofile
ociwritetemporarylob

8.85.88 ocicolumntype()Retourne le type de données d'une colonne Oracle

[ Exemples avec ocicolumntype ]   PHP 3>= 3.0.4, PHP 4 , PHP 5

mixed  ocicolumntype ( resource   stmt , int   col )

ocicolumntype retourne le type de données de la colonne correspondant au numéro de colonne col dans le résultat stmt (les colonnes sont indexées à partir de 1).

Exemple avec ocicolumntype

<?php   
echo "<html><pre>\n";   
$conn = OCILogon("scott", "tiger");
$stmt = OCIParse($conn,"select * from emp");
OCIExecute($stmt);
echo
'<table>';
echo
'<tr>';
echo
'<th>Nom</th>';
echo
'<th>Type</th>';
echo
'<th>Longueur</th>';
echo
'</tr>';
$ncols = OCINumCols($stmt);
for (
$i = 1; $i <= $ncols; $i++ ) {
  
$column_name  = OCIColumnName($stmt,$i);
  
$column_type  = OCIColumnType($stmt,$i);
  
$column_size  = OCIColumnSize($stmt,$i);
  echo
'<tr>';
  echo
'<td>' . $column_name . '</td>';
  echo
'<td>' . $column_type . '</td>';
  echo
'<td>' . $column_size . '</td>';
  echo
'</tr>';
}
echo
"</table>\n";
OCIFreeStatement($stmt);  
OCILogoff($conn);   
echo
'</pre>';
echo
"</html>\n";
?>

Note

Cette fonction a été renommée en oci_field_type pour PHP version 5.0.0 et plus récent. Pour la compatibilité ascendante, ocicolumntype peut toujours être utilisée. Toutefois, elle est obsolète.

<< ocicolumntype >>
ocicolumnsize Oracle 8 ocicolumntyperaw