Current Query : select o.id as ord,oi.id as order_item, oid.id as order_item_details from orders o join order_items oi on o.id = oi.order_id join order_item_details oid on oid.order_item_id = oi.id join products_pricing_plans ppp on oi.pricing_plan_id = ppp.id where user_id = order by oid.start_date desc limit 1
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'order by oid.start_date desc limit 1' at line 7