Hello,
i'm developing a custom module.

I chose to create new prefixed menu tables (with domain prefix) every time a new domain is created.

Now i wonder, how can i programmatically add a new menu entry to this new created menu ?

In general, how can i use drupal core functions (in particular drupal_excute) with prefixed tables ?

The issue is that there isn't a way to programmatically switch to a new domain
so all operation can only affect the "main" tables (non prefixed ones) i think.

Comments

agentrickard’s picture

Status: Active » Closed (duplicate)

See #343281: Updating {tables} affect all prefixed tables?... for a similar request. You can actually switch tables programatically, but there is no simple function for doing so.

The function domain_prefix_query() is an attempt to do so, but it needs testing.