When accessing
admin/store/settings/uc_discounts/edit
and when using a $db_prefix in drupal's settings.php,
the missing {}'s around "node" result in a missing table sql warning.
lines 226-227 of uc_discounts_alt/uc_discounts/uc_discounts.admin.inc, in uc_discounts_form()
$result = db_query("SELECT n.nid as nid, n.title as title, p.model as model"
. " FROM {uc_products} p INNER JOIN node n ON p.nid=n.nid ORDER BY title");
reviewing the rest of the code, found missing {}'s around "term_node" at
line 811 of uc_discounts_alt/uc_discounts/uc_discounts.module, in get_discounts_for_order()
$result = db_query( "SELECT DISTINCT tid FROM term_node WHERE nid IN(%s)", join(",", $order_product_ids) );
and again at
line 1158 of uc_discounts_alt/uc_discounts/uc_discounts.module, in get_codeless_discounts_for_product()
$result = db_query("SELECT DISTINCT tid FROM term_node WHERE nid=%d", $product_id);
Comments
Comment #1
ryangroe commentedThat was very sloppy of me. This fix will be part of the beta 7 release I am about to make.
Comment #2
ryangroe commentedforgot to update status
Comment #3
ezra-g commentedThis has been committed, so I'm marking it as fixed ;).