// Get all menus
foreach (array('guest','member','admin') as $menu) {
// Query it
- $result = SQL_QUERY_ESC("SELECT `action`, `what` FROM `{?_MYSQL_PREFIX?}_%s_menu` ORDER BY `action` ASC,`what` ASC",
+ $result = sqlQueryEscaped("SELECT `action`, `what` FROM `{?_MYSQL_PREFIX?}_%s_menu` ORDER BY `action` ASC,`what` ASC",
array($menu), __FILE__, __LINE__);
// Init array
$menus = array();
// Load all entries
- while ($entry = SQL_FETCHARRAY($result)) {
+ while ($entry = sqlFetchArray($result)) {
// Is the menu entry set?
if (!isset($menus['menu'][$entry['action']][$entry['what']])) {
// Not found
// Remove all except one
if (is_null($entry['what'])) {
// Main menu is double
- SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `action`='%s' AND `what` IS NULL LIMIT %s",
+ sqlQueryEscaped("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `action`='%s' AND `what` IS NULL LIMIT %s",
array(
$menu,
$entry['action'],
), __FILE__, __LINE__);
} else {
// Sub menu is double
- SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `action`='%s' AND `what`='%s' LIMIT %s",
+ sqlQueryEscaped("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `action`='%s' AND `what`='%s' LIMIT %s",
array(
$menu,
$entry['action'],
} // END - while
// Free result
- SQL_FREERESULT($result);
+ sqlFreeResult($result);
// Init sqls
initSqls();