sesam_field_array --
Return meta information about individual columns in a result
Syntax
array sesam_field_array ( string result_id )
result_id is a valid result id returned by
sesam_query().
Returns a mixed associative/indexed array with meta information
(column name, type, precision, ...) about individual columns of
the result after the query associated with
result_id.
Table 1.
Mixed result set returned by sesam_field_array()
Array Element
Contents
int $arr["count"]
Total number of columns in result set (or zero if this was
an "immediate" query). SESAM "multiple fields" are
"inlined" and treated like the respective number of columns.
string $arr[col]["name"]
column name for column(col), where
col is between 0 and
$arr["count"]-1. The returned value can
be the empty string (for dynamically computed
columns). SESAM "multiple fields" are "inlined" and treated
like the respective number of columns, each with the same
column name.
string $arr[col]["count"]
The "count" attribute describes the repetition factor when
the column has been declared as a "multiple field". Usually,
the "count" attribute is 1. The first column of a "multiple
field" column however contains the number of repetitions
(the second and following column of the "multiple field"
contain a "count" attribute of 1). This can be used to
detect "multiple fields" in the result set. See the example
shown in the sesam_query() description
for a sample use of the "count" attribute.
string $arr[col]["type"]
PHP variable type of the data for
column(col), where col
is between 0 and $arr["count"]-1. The
returned value can be one of
depending on the SQL type of the result. SESAM "multiple
fields" are "inlined" and treated like the respective number
of columns, each with the same PHP type.
string $arr[col]["sqltype"]
SQL variable type of the column data for
column(col), where col
is between 0 and $arr["count"]-1. The
returned value can be one of
"CHARACTER"
"VARCHAR"
"NUMERIC"
"DECIMAL"
"INTEGER"
"SMALLINT"
"FLOAT"
"REAL"
"DOUBLE"
"DATE"
"TIME"
"TIMESTAMP"
describing the SQL type of the result. SESAM "multiple
fields" are "inlined" and treated like the respective number
of columns, each with the same SQL type.
string $arr[col]["length"]
The SQL "length" attribute of the SQL variable in
column(col), where col
is between 0 and $arr["count"]-1. The
"length" attribute is used with "CHARACTER" and "VARCHAR"
SQL types to specify the (maximum) length of the string
variable. SESAM "multiple fields" are "inlined" and treated
like the respective number of columns, each with the same
length attribute.
string $arr[col]["precision"]
The "precision" attribute of the SQL variable in
column(col), where col
is between 0 and $arr["count"]-1. The
"precision" attribute is used with numeric and time data
types. SESAM "multiple fields" are "inlined" and treated
like the respective number of columns, each with the same
precision attribute.
string $arr[col]["scale"]
The "scale" attribute of the SQL variable in
column(col), where col
is between 0 and $arr["count"]-1. The
"scale" attribute is used with numeric data types. SESAM
"multiple fields" are "inlined" and treated like the
respective number of columns, each with the same scale
attribute.
See also sesam_query() for an example
of the sesam_field_array() use.
Php sesam field array Function syntax tag
sesam field array php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online
Php sesam field array syntax tutorial
php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.