|
|
| wb_field_num | Information about Cursors | wb_field_type_num |
This function returns the SQL type of a column specified by the cursor column number. This function returns these SQL type names:
| column type | returned string |
| BOOLEAN | BOOLEAN |
| CHAR | CHAR |
| TINYINT | TINYINT |
| SMALLINT | SMALLINT |
| INTEGER | INT |
| BIGINT | BIGINT |
| NUMERIC | NUMERIC |
| REAL | REAL |
| CHAR(n) | VARCHAR |
| NCHAR(n) | NCHAR |
| BINARY(n) | BINARY |
| DATE | DATE |
| TIME | TIME |
| TIMESTAMP | TIMESTAMP |
| CLOB | CLOB |
| NCLOB | NCLOB |
| BLOB | BLOB |
| other types | FALSE |
You may also get the SQL type number with the wb_field_type_num function.
String with the name of the column SQL type or FALSE if an error occurs.
Get the name of the SQL type of the third column in the $cursor cursor:
$result = wb_field_type($cursor,3);
if( $result==FALSE ) { ... }
else { echo "type name: ",$result; }
| wb_field_num | Information about Cursors | wb_field_type_num |