note 44233 deleted from ref.mysql by betz

From: Date: Mon, 19 Jul 2004 07:31:10 +0000
Subject: note 44233 deleted from ref.mysql by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-73589@lists.php.net to get a copy of this message
Note Submitter: rushik_life@yahoo.com ---- for fetching a table into 2D array with field names using metadata <?// fetch table data into 2D array. for($i=0; $i<mysql_num_rows($result); $i++) { //advances the row in the mysql resource $result mysql_data_seek($result,$i); //assigns the two dim array keys, $users[row][field] $users[$i]=mysql_fetch_row($result); } //fetch the field names for($j=0;$j<$tt;$j++) { $meta = mysql_fetch_field($result, $j); $flds[$j]=$meta->name; } //fetch table name

« previous php.notes (#73589) next »