Get mlid by nid

Public

</> CopyGet raw version
php
  1. $mlid = db_select('menu_links' , 'ml')
  2.  
  3. ->condition('ml.link_path' , 'node/' . $node->nid)
  4.  
  5. ->fields('ml' , array('mlid'))
  6.  
  7. ->execute()
  8.  
  9. ->fetchField();