From: quix0r Date: Mon, 9 Nov 2009 03:13:49 +0000 (+0000) Subject: SQL fix X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=deafc2819f51df3d81f5efa8eb55b1c4c04a45b5;p=mailer.git SQL fix --- diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index b2614077ab..9503fff2fa 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -1552,13 +1552,11 @@ function generateOptionList ($table, $id, $name, $default='', $special='', $wher } else { // Data from database $SPEC = ', `' . $id . '`'; - if (!empty($special)) $SPEC = ', ' . $special; - $ORDER = $name . $SPEC; - if ($table == 'country') $ORDER = $special; + if (!empty($special)) $SPEC = ', `' . $special . '`'; // Query the database - $result = SQL_QUERY_ESC("SELECT `%s`, `%s`".$SPEC." FROM `{?_MYSQL_PREFIX?}_%s` ".$where." ORDER BY %s", - array($id, $ORDER, $table, $name), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `%s`, `%s`".$SPEC." FROM `{?_MYSQL_PREFIX?}_%s` ".$where." ORDER BY `%s` ASC", + array($id, $name, $table, $name), __FUNCTION__, __LINE__); // Do we have rows? if (SQL_NUMROWS($result) > 0) {