mysql - SQL query (~5 tables join if possible)? -


i have mysql tables:

products id  products_content product_id, lang, product_name, product_content  products_and_categories product_id, category_id  products_categories id, parent_id  products_categories_content category_id, lang, category_name, category_content  products_and_prices product_id, price_id  products_prices id  products_prices_content price_id, lang, description, weight, price, currency 

how select products category id 5 (for example) , prices every single product? possible single query?

currently select products category, i'm using (codeigniter):

    $this->db->select('*')         ->from('products')         ->join('products_content', 'products_content.product_id = products.id')         ->join('products_and_categories', 'products_and_categories.product_id = products.id')         ->where(array('category_id' => $category_id, 'lang' => $lang)); 


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -