21 Feb
2005
21 Feb
'05
7:52 a.m.
On Sun, 20 Feb 2005, Chris Cook wrote:
I'm debugging an issue in the project module on Drupal cvs.
Most node queries use the node_access_where_sql() function like so.
"SELECT foo FROM bar WHERE " . node_access_where_sql() . " AND criteria = true"
However, the first test in the function returns nothing which will obviously result in an invalid query. Shouldn't the function return a value of "0" or something so that queries will always be valid?
http://drupaldocs.org/api/head/function/node_access_where_sql
MAybe some docs need to be updated. We now use db_rewrite_query. See current code for examples. Cheers, Gerhard