Line 280 of associated_nodes.module:
$q = "INSERT INTO {associated_nodes_association} SET name = '%s'";

This can not work. I changed the line to the following in order to get the module working:

$q = "INSERT INTO {associated_nodes_association} (name) VALUES ('%s')";

CommentFileSizeAuthor
#1 associated_nodes_altersql.patch2.67 KBxatoo_

Comments

xatoo_’s picture

Priority: Critical » Normal
StatusFileSize
new2.67 KB

Ok, there are some more changes to be made:

On line 386 of associated_nodes.module change:
$q = "INSERT INTO {associated_nodes_cache} SET aid = %d, nid = %d, associated_nid = %d";
Into:
$q = "INSERT INTO {associated_nodes_cache} (aid, nid, associated_nid) VALUES (%d, %d, %d)";

On line 479 of associated_nodes.module change:
$q = "INSERT INTO {associated_nodes_nodetype} SET aid = %d, type = '%s'";
Into:
$q = "INSERT INTO {associated_nodes_nodetype} (aid, type) VALUES (%d, '%s')";

On line 491 of associated_nodes.module change:
$q = "INSERT INTO {associated_nodes_criterion} SET aid = %d, type = '%s', element = '%s', weight = %f";
Into:
$q = "INSERT INTO {associated_nodes_criterion} (aid, type, element, weight) VALUES (%d, '%s', '%s', %f)";

On line 516 of associated_nodes.module change:
$q = "INSERT INTO {associated_nodes_association} SET name = ''";
Into:
$q = "INSERT INTO {associated_nodes_association} (name) VALUES ('')";

jfberroyer’s picture

Thanks for your bug repport and patch.
Actualy, the SQL inserts was not standard (I imagine you don't use MySQL)
I will apply your patch and do a new release soon.

xatoo_’s picture

Status: Needs review » Closed (fixed)