From the bottom up
   You have to start some where

PHP’s implode() in MySQL

Here is a quick tip, to get similar result as php’s array implode function inside of MySQL use GROUP_CONCAT() here is a quick example

SELECT store_orders.*,
(SELECT GROUP_CONCAT(item_name) FROM `store_orderitems` WHERE store_orders.id=store_orderitems.order_id) AS items_purchased
FROM `store_orders`

Leave a Reply

You must be logged in to post a comment.