Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
create table products (id int, name varchar(128), price int); SELECT p.*, c.title as category_title, f.title as filter_title FROM products as p JOIN product_category as pc ON p.id = pc.product_id JOIN categories as c ON pc.category_id = c.id JOIN product_filter as pf ON p.id = pf.product_id JOIN filters as f ON pf.filter_id = f.id WHERE p.id = '2' GROUP BY p.name, c.title, f.title

Stuck with a problem? Got Error? Ask AI support!

Copy Clear