Closed (fixed)
Project:
SimpleTest
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 Nov 2009 at 09:03 UTC
Updated:
6 Dec 2009 at 09:20 UTC
I have a problem with a query that doesn't give any error during the normal execution of the module, but it gives problems while executing the tests for the module.
I have to change the code from
$results = db_query(
"SELECT nid FROM {node_access} WHERE realm = 'book_access' AND gid IN (" . db_placeholders($roles, 'int') . ") AND grant_update > 0",
$roles
);
to
$results = db_query(
"SELECT nid FROM {node_access} WHERE realm = 'book_access' AND gid IN (%s) AND grant_update > 0",
implode(', ', $roles)
);
in order to not get any errors from the tests.
Is that a know issue, or am I doing anything wrong?
To notice that the error message shows only part of the query (SELECT nid FROM {node_access} WHERE realm = 'book_access' AND gid IN (
, while it should be supposed to show all the query.
Comments
Comment #1
avpadernoI changed the query back to as it was before, and I don't get any error anymore.
I don't know why, but it is now working as it should.