Display mysql table datatype with PHP
Free Scripts :: PHP :: PHP and Mysql :: Display mysql table datatype with PHP
Author: Salman Javaid
Website: http://www.salman.be
Website: http://www.salman.be
- How to display mysql table field types.
- Show all mysql fielddatatypes with php.
- List datatypes of mysql table fields.
This script list all mysql table's field types.
Script
$i=0;
$sql = mysql_query("select * from products");
while( $i < mysql_num_fields($sql))
{
echo mysql_field_type($sql, $i) . ', ';
$i++;
}
Output
int, string, blob, date, time




