mysql_field_type
string mysql_field_type(mysql result result_handle, int field_offset)
result_handle | Result handle returned by mysql_db_query() or mysql_query() |
field_offset | Field offset to use |
Gets the type of the specified field.
Returns:
String; FALSE on error
Description:
mysql_field_type() returns the type of the specified field in a query. The field_offset argument specifies the desired field. Field offsets start at 0.
The types returned by this function are similar but not identical to MySQL’s column types. If the column value is generated by an expression, the type of the result determines the type of the column. For example, suppose this is the query: SELECT count(user);
The type would be int.
The following table lists the types. ...
Get PHP Functions Essential Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.