define('SERVER_URL', "http://www.mxchange.org");
// This current patch level
-define('CURR_SVN_REVISION', "348");
+define('CURR_SVN_REVISION', "349");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
}
}
// SELECT query string from table, columns and so on... ;-)
-function SQL_RESULT_FROM_ARRAY ($table, $columns, $idRow, $id) {
+function SQL_RESULT_FROM_ARRAY ($table, $columns, $idRow, $id, $F, $L) {
// Prepare the SQL statement
$SQL = "SELECT ".implode(", ", $columns)." FROM "._MYSQL_PREFIX."_".$table." WHERE ".$idRow."=%s LIMIT 1";
// Return the result
- return SQL_QUERY_ESC($SQL, array(bigintval($id)), __FILE__, __LINE__);
+ return SQL_QUERY_ESC($SQL, array(bigintval($id)), $F, $L);
}
// ALTER TABLE wrapper function
function SQL_ALTER_TABLE($sql, $F, $L) {
// Get column information
$result = SQL_QUERY_ESC("SHOW COLUMNS FROM %s LIKE '%s'",
- array($tableName, $columnName), __FILE__, __LINE__);
+ array($tableName, $columnName), $F, $L);
// Do we have no entry?
if (SQL_NUMROWS($result) == 0) {
$id = bigintval($id);
// Get result from a given column array and table name
- $result = SQL_RESULT_FROM_ARRAY($table, $columns, $idColumn, $id);
+ $result = SQL_RESULT_FROM_ARRAY($table, $columns, $idColumn, $id, __FILE__, __LINE__);
// Is there one entry?
if (SQL_NUMROWS($result) == 1) {
// Load all what menu points
$result = SQL_QUERY("SELECT id, what, title
- FROM "._MYSQL_PREFIX."_guest_menu
- WHERE action='main' AND what != '' AND what IS NOT NULL AND locked='N'
- ORDER BY sort", __FILE__, __LINE__);
+FROM "._MYSQL_PREFIX."_guest_menu
+WHERE action='main' AND what != '' AND what IS NOT NULL AND locked='N'
+ORDER BY sort ASC", __FILE__, __LINE__);
$SW = 2; $OUT = ""; $atitle = "";
while (list($id, $wht, $wtitle) = SQL_FETCHROW($result))