View Single Post
Old 05-23-2008, 03:23 PM   #3 (permalink)
buggabill
The Contributor
 
buggabill's Avatar
 
Join Date: Jan 2008
Location: Maine, USA
Posts: 92
Thanks: 2
buggabill is on a distinguished road
Default

I just thought of another way, but it would require that a result came back from your query. You could dump the first row of the result into an array using mysql_fetch_assoc and get the keys from the array using array_keys like this:

php Code:
.
.
.
    $sql = 'some query';

    $result = mysql_query($sql, $link);

    $row = mysql_fetch_assoc($result);

    $recset_arr = array_keys($row);
.
.
.

This would dump the key names of $row into an array that you could parse.
__________________
-- Bill
"Why is it drug addicts and computer aficionados are both called users?" -Clifford Stoll
buggabill is offline  
Reply With Quote
The Following User Says Thank You to buggabill For This Useful Post:
Dave (05-24-2008)