Module doesn't handle Drupal DB prefix
regli - May 9, 2007 - 00:44
| Project: | Content Recommendation Engine |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
this code in in voting_actions.inc in the distinct query doesn't handle the DB prefix.
$results = db_query("SELECT DISTINCT %s FROM {votingapi_%s} WHERE content_type = 'node'", $field, $table);

#1
Correction.
The problem is actually in the cre "node_recommendation.module".
the code:
$db_result = db_query("SELECT DISTINCT tag from votingapi_vote");
should actually be
$db_result = db_query("SELECT DISTINCT tag from {votingapi_vote}");
#2