Sorry Vincent, What I meant by 'not OK' is that the code:
else if(mysql_field_type($fields,$i) == 'enum') {
//---use select menu generation function here
}
Obviousely doesn't work as ENUM() is totally different field type to say BLOB() for example. (multiple values)
I can get the 'enum' string from a DB result (using the code below), but I'm unable to extract it from outside of the while loop: (I don't want to encase the whole if-else structure within the loop, because while my select menu is now displayed, all the fields are then multiplied! I only need a single occurance of each!)
$result = mysql_query("DESC $tabid");
while(list($name,$type) = mysql_fetch_row($result)) {
$this_is = substr($type,0,4);
if($this_is == 'enum') {
echo $this_is; //echoes 'enum' if an enum field exists
}//----end if
}//----end while
Cheers.
Russ