Hi,
I'm trying to create an array from an SQL table description.
When I run this:
I get:
...I'd like to get the results from the "describe" into an array.
Any ideas?
I'm trying to create an array from an SQL table description.
When I run this:
Code:
$res = mysql_query("DESCRIBE $tablename");
while($row = mysql_fetch_array($res)) {
echo "{$row['Field']} - {$row['Type']}<br>";
}
I get:
Code:
name - varchar(20)
age - int(3)
...I'd like to get the results from the "describe" into an array.
Any ideas?