[support] db_rewrite_sql in location.module [WAS: turn debug on?]
Earnie Boyd
earnie at users.sourceforge.net
Fri Sep 28 12:55:50 UTC 2007
Quoting sander-martijn <lists at severeddreams.com>:
> The problem was with the following line in location.module:
> $result = pager_query(db_rewrite_sql($query), 10, 0, $count_query,
> db_rewrite_sql($query_args));
>
> Specifically, it was the db_rewrite_sql method. Removing it results in
> the following line:
> $result = pager_query($query, 10, 0, $count_query, $query_args);
>
After reviewing the CVS code I think you want
$result = pager_query(db_rewrite_sql($query), 10, 0, $count_query,
$query_args);
> This works. I read through the api documentation for a bit at
I don't know if this will help (read: work). I do know that the code
in HEAD is completely different than the code for the DRUPAL-5 tag.
> http://api.drupal.org/api/function/db_rewrite_sql/5 and believe it has
> something to do with "nid is rewritten if needed" since I was getting an
> "nid is ambiguous" error earlier. However since I can't be positive as
> to why that function was being used and whether it is indeed necessary
> in certain cases, I will refrain from submitting a patch.
>
It is part of the API that allows for the use of multiple databases on
differing servers. If you don't have multiple databases, then you
don't need it; but ...
Earnie -- http://for-my-kids.com/
-- http://give-me-an-offer.com/
More information about the support
mailing list