recuperation de type de champs d'une table
bonjour,
je bosse sur un projet, et je voudrai modifier le type d'un champ d'une table, et pour cela je dois d'abord recupérer son type initial, j'utilise ce code :
$result = mysql_query('select * from matable);
$i = 0;
$tab=array();
$tab[0]='';
while ($i<mysql_num_fields($result)) {
$meta = mysql_fetch_field($result, $i);
$tab[$i+1]=$meta->type;
$i++;
}$tab[0]=$i+1;
quand il s'agit d'un float, il m retourne REAL
quand il s'agit d'un varchar il retourne un STRING
merci d'avance pour vos reponses.