[drupal-devel] node_access_where_sql()

Gerhard Killesreiter killesreiter at physik.uni-freiburg.de
Mon Feb 21 06:52:59 UTC 2005



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




More information about the drupal-devel mailing list