note 39531 added to function.mysql-list-fields

From: Date: Sun, 01 Feb 2004 09:45:27 +0000
Subject: note 39531 added to function.mysql-list-fields
Groups: php.notes 
Request: Send a blank email to php-notes+get-64498@lists.php.net to get a copy of this message
I couldn't get any of this field stuff to work. Anyway here is what I did...since I only needed field names on the first row... while ($test_row = mysql_fetch_assoc($test_query)) { if ($i == 0) { $columns = array_keys($test_row); // here is your array of column names. } $i++; // conduct your data business here... } ---- Manual Page -- http://www.php.net/manual/en/function.mysql-list-fields.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39531 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39531&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39531&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#64498) next »