How do I get the menu ID based on the menu title?
Tricky question. In short, you can't. You can query the menu_links table all you want, be my guest, but realize please that the title you see on the page and the title in the database is the same only in one case: you are running an English-only website and the title_callback is t. (And if you are on D7, you are not overridden in settings.php or in D6 with string overrides and...) Otherwise the title is generated dynamically and it's literally impossible to figure out from the DB alone.