I get this error when I turn on error reporting
Tygh\Exceptions\AException
Message
Column 'order_id' in where clause is ambiguous (1052)
SELECT SUM(amount) as total , DATE_FORMAT(FROM_UNIXTIME(timestamp), '%Y-%m') as `interval`, timestamp FROM cscart_order_details LEFT JOIN cscart_orders ON cscart_orders.order_id = cscart_order_details.order_id WHERE cscart_orders.order_id IN ('1686', '1694', '1756', '1766', '1884', '1917', '1987', '2024', '2171', '2172', '2233', '2261', '2270', '2300', '2369', '2371', '2377', '2410', '2485', '2509', '2535', '2616', '2617', '2620', '2632', '2816', '2830', '2845', '2854', '2867', '2986', '2989', '2999', '3072') AND timestamp BETWEEN 1356962400 AND 1448892000 AND status != 'T' AND is_parent_order != 'Y' AND order_id IN (1686, 1694, 1756, 1766, 1884, 1917, 1987, 2024, 2171, 2172, 2233, 2261, 2270, 2300, 2369, 2371, 2377, 2410, 2485, 2509, 2535, 2616, 2617, 2620, 2632, 2816, 2830, 2845, 2854, 2867, 2986, 2989, 2999, 3072) AND product_id IN (119) GROUP BY `interval`
Error at
app/Tygh/Database.php, line: 714
Backtrace
File:
app/Tygh/Database.php
Line:
359
Function:
error
File:
app/Tygh/Database.php
Line:
166
Function:
query
File:
app/functions/fn.database.php
Line:
42
Function:
getHash
File:
app/functions/fn.sales_reports.php
Line:
548
Function:
db_get_hash_array
File:
app/controllers/backend/sales_reports.php
Line:
216
Function:
fn_get_report_statistics
File:
app/functions/fn.control.php
Line:
680
Function:
include
File:
app/functions/fn.control.php
Line:
451
Function:
fn_run_controller
File:
xxxxxxx.php
Line:
27
Function:
fn_dispatch
​