diff options
author | mistic100 <mistic@piwigo.org> | 2013-11-10 17:03:25 +0000 |
---|---|---|
committer | mistic100 <mistic@piwigo.org> | 2013-11-10 17:03:25 +0000 |
commit | e01b40c529245e9ead5243a7505d909ca0131c96 (patch) | |
tree | 9c18f1b19b3fd154c7626e2355047255de0fb500 /include/dblayer/functions_mysql.inc.php | |
parent | 7d7a1ce4e47d07d4c75d295a4ce0945d3b9d41c1 (diff) |
move array_from_query to functions.inc.php
git-svn-id: http://piwigo.org/svn/trunk@25427 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/dblayer/functions_mysql.inc.php | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/include/dblayer/functions_mysql.inc.php b/include/dblayer/functions_mysql.inc.php index 3992ed6c2..760587094 100644 --- a/include/dblayer/functions_mysql.inc.php +++ b/include/dblayer/functions_mysql.inc.php @@ -200,36 +200,6 @@ function pwg_db_close() * */ -/** - * creates an array based on a query, this function is a very common pattern - * used here - * - * @param string $query - * @param string $fieldname optional - * @return array - */ -function array_from_query($query, $fieldname=false) -{ - $array = array(); - - $result = pwg_query($query); - if (false === $fieldname) - { - while ($row = mysql_fetch_assoc($result)) - { - $array[] = $row; - } - } - else - { - while ($row = mysql_fetch_assoc($result)) - { - $array[] = $row[$fieldname]; - } - } - return $array; -} - define('MASS_UPDATES_SKIP_EMPTY', 1); /** * updates multiple lines in a table |