Quote:
Originally posted by Pinocchi
only thing I'm still looking at is the query to select all columns in a table. Like that you wouldn't have to manually type the column (and need to know it) but could just select the one you want it to be ordered by.
|
Here you go:
-- cut ---
$mylink = mysql_connect('localhost', 'myname', 'secret');
$tablefields = mysql_list_fields("databasename", "tablename", $mylink);
$columncount = mysql_num_fields($tablefields);
for ($i = 0; $i < $columncount; $i++)
{
echo mysql_field_name($tablefields, $i) . " - ";
}
-- cut ---
Regards,
Logician