PHP 忒聊
綴豖
ヶ輛
OCIColumnSize
(PHP 3 = 3.0.4, PHP 4)
Description
OCIColumnSize() returns the size of the column as given by Oracle. You can either use the column-number (1-Based) or the column-name for the col parameter.
瞰赽 1. OCIColumnSize
?php print "HTML PRE \n"; $conn = OCILogon("scott", "tiger"); $stmt = OCIParse($conn,"select * from emp"); OCIExecute($stmt); print" TABLE BORDER=\"1\" "; print "TR "; print" TH Name /TH "; print "TH Type /TH "; print" TH Length /TH "; print "/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); print" TR "; print "TD $column_name /TD "; print" TD $column_type /TD "; print "TD $column_size /TD "; print" /TR ";} print "/TABLE "; OCIFreeStatement($stmt); OCILogoff($conn); print" /PRE "; print "/HTML \n";?
See also OCINumCols(), OCIColumnName(), and OCIColumnSize().
綴豖
れ萸
ヶ輛
OCIColumnScale
奻珨撰
OCIColumnType