54 parent::__construct(
$db,
'menus_menu',
'MenusMenu',
'id',
'title');
62 $sql =
"UPDATE " . $this->table
63 .
" SET weight = weight+1"
64 .
" WHERE weight >= " . $obj->
getVar(
'weight')
65 .
" AND id <> " . $obj->
getVar(
'id')
67 .
" AND mid = " . $obj->
getVar(
'mid')
69 $this->db->queryF(
$sql);
71 $sql =
"SELECT id FROM " . $this->table
72 .
" WHERE mid = " . $obj->
getVar(
'mid')
74 .
" ORDER BY weight ASC"
78 while (list(
$id) = $this->db->fetchrow(
$result)) {
79 $sql =
"UPDATE " . $this->table
80 .
" SET weight = {$i}"
83 $this->db->queryF(
$sql);
__construct(Connection $db=null)
update_weights(MenusMenu $obj)
getVar($key, $format= 's')
initVar($key, $data_type, $value=null, $required=false, $maxlength=null, $options= '')