Мебель
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20188 limit 1
select * from catalog_photo where idt=20188 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20189 limit 1
select * from catalog_photo where idt=20189 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20190 limit 1
select * from catalog_photo where idt=20190 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20191 limit 1
select * from catalog_photo where idt=20191 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20248 limit 1
select * from catalog_photo where idt=20248 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20249 limit 1
select * from catalog_photo where idt=20249 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20250 limit 1
select * from catalog_photo where idt=20250 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20252 limit 1
select * from catalog_photo where idt=20252 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20253 limit 1
select * from catalog_photo where idt=20253 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20254 limit 1
select * from catalog_photo where idt=20254 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20255 limit 1
select * from catalog_photo where idt=20255 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20257 limit 1
select * from catalog_photo where idt=20257 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20258 limit 1
select * from catalog_photo where idt=20258 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20259 limit 1
select * from catalog_photo where idt=20259 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20260 limit 1
select * from catalog_photo where idt=20260 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=21147 limit 1
select * from catalog_photo where idt=21147 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=21148 limit 1
select * from catalog_photo where idt=21148 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=21154 limit 1
select * from catalog_photo where idt=21154 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=21155 limit 1
select * from catalog_photo where idt=21155 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=21156 limit 1
select * from catalog_photo where idt=21156 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=21157 limit 1
select * from catalog_photo where idt=21157 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=21158 limit 1
select * from catalog_photo where idt=21158 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=21159 limit 1
select * from catalog_photo where idt=21159 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=21160 limit 1
select * from catalog_photo where idt=21160 order by tomain desc, id asc limit 1
select * from catalog_photo where idt=20188 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20189 limit 1
select * from catalog_photo where idt=20189 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20190 limit 1
select * from catalog_photo where idt=20190 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20191 limit 1
select * from catalog_photo where idt=20191 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20248 limit 1
select * from catalog_photo where idt=20248 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20249 limit 1
select * from catalog_photo where idt=20249 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20250 limit 1
select * from catalog_photo where idt=20250 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20252 limit 1
select * from catalog_photo where idt=20252 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20253 limit 1
select * from catalog_photo where idt=20253 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20254 limit 1
select * from catalog_photo where idt=20254 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20255 limit 1
select * from catalog_photo where idt=20255 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20257 limit 1
select * from catalog_photo where idt=20257 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20258 limit 1
select * from catalog_photo where idt=20258 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20259 limit 1
select * from catalog_photo where idt=20259 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20260 limit 1
select * from catalog_photo where idt=20260 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=21147 limit 1
select * from catalog_photo where idt=21147 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=21148 limit 1
select * from catalog_photo where idt=21148 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=21154 limit 1
select * from catalog_photo where idt=21154 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=21155 limit 1
select * from catalog_photo where idt=21155 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=21156 limit 1
select * from catalog_photo where idt=21156 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=21157 limit 1
select * from catalog_photo where idt=21157 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=21158 limit 1
select * from catalog_photo where idt=21158 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=21159 limit 1
select * from catalog_photo where idt=21159 order by tomain desc, id asc limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=21160 limit 1
select * from catalog_photo where idt=21160 order by tomain desc, id asc limit 1