Set menu_links weight on multi-sites

WE HAVE MOVED!

Please visit our new Drupal Website at https://www.xenyo.com我們的新網頁設計公司網頁.

  update menu_links as m1 
  inner join menu_links as m2
  on (m2.link_path = 'admin/content/signup' and m2.menu_name = 'primary-links') 
  set m1.weight = m2.weight-1 , m1.depth = m2.depth , m1.plid = m2.plid,m1.p1 = m2.p1, 
  m1.p2 = if((m2.depth = 2),m2.mlid,if((2>m2.depth), NULL,m2.p2)) ,
  m1.p3 = if((m2.depth = 3),m2.mlid,if((3>m2.depth), NULL,m2.p3)) ,
  m1.p4 = if((m2.depth = 4),m2.mlid,if((4>m2.depth), NULL,m2.p4)) ,
  m1.p5 = if((m2.depth = 5),m2.mlid,if((5>m2.depth), NULL,m2.p5)) , 
  m1.link_title = 'xxxxxx'
  where m1.link_path = 'admin/settings/xxx/signupst' and m1.menu_name = 'primary-links'
Help Share this Article