1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where price <=49.9999 ) union (select count(*) as c,price from where price>=' at line 1

in:

[(select count(*) as c,price from where price <=49.9999 ) union (select count(*) as c,price from where price>=50 and price<=99.9999 ) union (select count(*) as c,price from where price>=100 and price<=149.9999 ) union (select count(*) as c,price from where price>=150 and price<=199.9999 ) union (select count(*) as c,price from where price>=200 and price<=249.9999 ) union (select count(*) as c,price from where price>=250 and price<=299.9999 ) union (select count(*) as c,price from where price>=300 and price<=349.9999 ) union (select count(*) as c,price from where price>=350 and price<=399.9999 ) union (select count(*) as c,price from where price >=400 )]

in:

[(select count(*) as c,price from where price <=49.9999 ) union (select count(*) as c,price from where price>=50 and price<=99.9999 ) union (select count(*) as c,price from where price>=100 and price<=149.9999 ) union (select count(*) as c,price from where price>=150 and price<=199.9999 ) union (select count(*) as c,price from where price>=200 and price<=249.9999 ) union (select count(*) as c,price from where price>=250 and price<=299.9999 ) union (select count(*) as c,price from where price>=300 and price<=349.9999 ) union (select count(*) as c,price from where price>=350 and price<=399.9999 ) union (select count(*) as c,price from where price >=400 )]