I am having difficulty JOINing 3 tables.
I have following table (Column)
apk_inv_item (item_id
)
apk_inv_category (category_id
)
apk_inv_item_category_defination (item_id
, category_id
)
I want to get category ID of the Item from the Item to Category Mapping table.
Here is what I have tried so far.. But it
select("apk_inv_item.*, apk_inv_category.inv_category_id")
->join("apk_inv_category", "apk_inv_item_category_defination.inv_category_id
= apk_inv_category.inv_category_id")
->find_all();
But I get Call to a member function num_rows()
that means query is not right.(Please note that I have tried simple 2 table JOIN with another table for testing and it works, means there is no issue with my MySQL connection or PHP code. Its issue with building that query)