query for those customer which have multiple order in mysql

SELECT customer.name, orders.order_name
FROM customer
LEFT JOIN orders ON customer.cid = orders.c_id
GROUP BY customer.cid
HAVING COUNT( orders.c_id ) >1

Comments

Popular posts from this blog

dynamic create multiple ckeditor onclick event using jquery

Fatal error: Can't use method return value in write context in ci

online visitor counter