ctsql_field_type
Returns the type of the specified field in a result.
Declaration
string ctsql_field_type ( resource queryID , int field_offset )
Description
ctsql_field_type() is similar to ctsql_field_name(). The arguments are identical, but the field type is returned instead. The field type will be one of “int”, “real”, “string”, and others as detailed in FairCom DB SQL documentation.
Example
<?php
ctsql_connect("localhost:ctreeSQL");
$result = ctsql_query("select * from mytable");
printf ("Field ID has type: ", ctsql_field_type($result, 1));
ctsql_free_result($result);
?>