Skip to content

Instantly share code, notes, and snippets.

@underdown
Created October 19, 2018 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save underdown/ade1f4d877cdfa6abe99a4ad26492964 to your computer and use it in GitHub Desktop.
Save underdown/ade1f4d877cdfa6abe99a4ad26492964 to your computer and use it in GitHub Desktop.
OpenCart query select all orders
SELECT
*
FROM
oc_order o
LEFT JOIN
oc_customer oc
ON (o.customer_id = oc.customer_id)
WHERE EXISTS (
SELECT
*
FROM
oc_order
WHERE
customer_id=o.customer_id
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment