Active
Project:
e-Commerce
Version:
5.x-3.6
Component:
ec_product
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Feb 2010 at 15:30 UTC
Updated:
23 Feb 2010 at 15:32 UTC
ecommerce/product/product.module
Line 1123 and 1159 (product_overview() and product_quicklist()):
$sql = 'SELECT n.nid, n.title, p.* FROM {node} as n, {ec_product} as p WHERE n.vid = p.vid AND n.status = 1'. tablesort_sql($header);
When I use this query with the hook_db_rewrite_sql() I get an error:
user warning: Unknown column 'n.nid' in 'on clause' query: SELECT DISTINCT(n.nid), n.title, p.* FROM node as n, ec_product as p LEFT JOIN mmoderation mm ON mm.nid = n.nid WHERE (mm.status IN(1, 0)) AND ( n.vid = p.vid AND n.status = 1 ) ORDER BY p.nid ASC LIMIT 0, 50 in /home/xxx/includes/database.mysql.inc on line 174.
The problem is this part of the query:
FROM {node} as n, {ec_product} as p
It would be better a JOIN.
Comments
Comment #1
foripepe commentedEg: