dai.hop
08-03-2009, 07:36 AM
Hi all,
I have the following query:
SELECT orders.*, order_lines.*
FROM orders
WHERE DATE(orders.timestamp) BETWEEN '2009-04-01' AND '2009-06-30'
LEFT JOIN order_lines
ON orders.txn_id = order_lines.transaction_id
ORDER BY orders.timestamp ASC
I can't see anything wrong with the syntax however whenever I execute it I get a 500 Internal Server Error back from phpMyAdmin.
Firstly, is the syntax of this query correct?
Secondly, can it be optimized to perform correctly?
Thanks!
dai.hop
I have the following query:
SELECT orders.*, order_lines.*
FROM orders
WHERE DATE(orders.timestamp) BETWEEN '2009-04-01' AND '2009-06-30'
LEFT JOIN order_lines
ON orders.txn_id = order_lines.transaction_id
ORDER BY orders.timestamp ASC
I can't see anything wrong with the syntax however whenever I execute it I get a 500 Internal Server Error back from phpMyAdmin.
Firstly, is the syntax of this query correct?
Secondly, can it be optimized to perform correctly?
Thanks!
dai.hop