note 35438 added to function.mysql-fetch-array

From: Date: Mon, 01 Sep 2003 11:46:06 +0000
Subject: note 35438 added to function.mysql-fetch-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-55399@lists.php.net to get a copy of this message
i want to get table-names and data in a (one) simple query to re-check things and setting things dynamicly based on tablenames... $sql = "select * from table"; $fields = mysql_query( $sql ); while($row=mysql_fetch_array($fields, MYSQL_ASSOC)) { while(list($key,$val) = each($row) ) { echo "tablename: $key value: $val<br>"; } } mysql_free_result($fields); ---- Manual Page -- http://www.php.net/manual/en/function.mysql-fetch-array.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35438 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35438&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35438&report=yes

« previous php.notes (#55399) next »