diff options
author | z0rglub <z0rglub@piwigo.org> | 2004-01-18 22:06:34 +0000 |
---|---|---|
committer | z0rglub <z0rglub@piwigo.org> | 2004-01-18 22:06:34 +0000 |
commit | 6dbfba37197a1cc149db70fe627c9e1ba64ad67d (patch) | |
tree | c02995850256cd38c211146a0c90ec0956af68b7 /include/config.inc.php | |
parent | 3d1277bf4d35dcd97c1bac312d1b065eea854fc9 (diff) |
Simplifying concatenation of $infos variables to select in the database
git-svn-id: http://piwigo.org/svn/branches/release-1_3@297 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/config.inc.php')
-rw-r--r-- | include/config.inc.php | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/include/config.inc.php b/include/config.inc.php index e067c7905..d7db7fbab 100644 --- a/include/config.inc.php +++ b/include/config.inc.php @@ -67,11 +67,7 @@ $infos = array( 'prefix_thumbnail', 'webmaster', 'mail_webmaster', 'access', 'upload_maxheight_thumbnail','log','comments_validation', 'comments_forall','authorize_cookies','mail_notification' ); -$query = 'SELECT '; -foreach ( $infos as $i => $info ) { - if ( $i > 0 ) $query.= ','; - $query.= $info; -} +$query = 'SELECT '.implode( ',', $infos ); $query.= ' FROM '.PREFIX_TABLE.'config;'; $row = mysql_fetch_array( mysql_query( $query ) ); |