note 35682 deleted from function.mysql-fetch-row by didou

From: Date: Thu, 11 Sep 2003 07:17:39 +0000
Subject: note 35682 deleted from function.mysql-fetch-row by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-56054@lists.php.net to get a copy of this message
Note Submitter: ---- This one: function mysql_buffered_query($data_select, $data_connection) { $sql_query = mysql_query($data_select, $data_connection); $sql_num_fields = mysql_num_fields($sql_query); $info_rows = 0; while($sql_fetch_rows = mysql_fetch_row($sql_query)) { $info_offset = 1; $info_columns = 0; while ($info_offset <= $sql_num_fields) { $info_elements[$info_rows][$info_columns] = $sql_fetch_rows[$info_columns]; $info_offset++; $info_columns++; } $info_rows++; } return $info_elements; } Can be written as: function mysql_buffered_query($data_select, $data_connection) { $sql_query = mysql_query($data_select, $data_connection); while($tmp = mysql_fetch_row($sql_query)) { $info_elements[]=$tmp; } }

« previous php.notes (#56054) next »