Thursday, 8 September 2011

inner join on more then two tables in php


select k2.id, k2.title, k2.extra_fields from jos_k2_items as k2
INNER JOIN jos_vm_order_item as oitem ON oitem.order_item_name=k2.title
INNER JOIN jos_vm_orders as orders ON orders.order_id=oitem.order_item_id
where orders.user_id=62