I get the following error message:
PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens: SELECT mlid FROM {menu_links} WHERE link_path LIKE 'node/:nid/mid/%' AND module = :module ; Array ( [:module] => nodesymlinks [:nid] => 75 ) in _nodesymlinks_nodeapi_delete() (Zeile 137 von /PATH/sites/all/modules/nodesymlinks/nodesymlinks.inc).

Comments

Wolfgang Reszel’s picture

Adding single quotation marks to the query (at :module) will fix it:

  $result = db_query("SELECT mlid FROM {menu_links} WHERE link_path LIKE 'node/:nid /mid/%' AND module = ':module'", array(':module' => 'nodesymlinks', ':nid' => $node->nid));
moskito’s picture

StatusFileSize
new754 bytes

Fix in #1 solve it. Here is a patch of it.

moskito’s picture

Status: Active » Needs review

Forgot to change status.

wojtha’s picture

Status: Needs review » Closed (fixed)

Thanks! Commited.

nsciacca’s picture

Issue summary: View changes
StatusFileSize
new767 bytes

This didn't work for me, the tokens can't be enclosed in quotes.. not sure if it's a newer database incompatibility. Anyhow, this is a super old issue but in case anyone else runs across it, here's an updated patch