Обеденные столы
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=17986 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=17979 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=17978 limit 1
select * from catalog_photo where idt=17978 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=17967 limit 1
select * from catalog_photo where idt=17967 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=17966 limit 1
select * from catalog_photo where idt=17966 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=15681 limit 1
select * from catalog_photo where idt=15681 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=12523 limit 1
select * from catalog_photo where idt=12523 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=11178 limit 1
select * from catalog_photo where idt=11178 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=1295 limit 1
select * from catalog_photo where idt=1295 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=24789 limit 1
select * from catalog_photo where idt=24789 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=24788 limit 1
select * from catalog_photo where idt=24788 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=24674 limit 1
select * from catalog_photo where idt=24674 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=24673 limit 1
select * from catalog_photo where idt=24673 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=24427 limit 1
select * from catalog_photo where idt=24427 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=24425 limit 1
select * from catalog_photo where idt=24425 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=24418 limit 1
select * from catalog_photo where idt=24418 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=24417 limit 1
select * from catalog_photo where idt=24417 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=24229 limit 1
select * from catalog_photo where idt=24229 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=24225 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=24224 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=24223 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=24219 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=23924 limit 1
select * from catalog_photo where idt=23924 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=23923 limit 1
select * from catalog_photo where idt=23923 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=17979 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=17978 limit 1
select * from catalog_photo where idt=17978 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=17967 limit 1
select * from catalog_photo where idt=17967 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=17966 limit 1
select * from catalog_photo where idt=17966 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=15681 limit 1
select * from catalog_photo where idt=15681 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=12523 limit 1
select * from catalog_photo where idt=12523 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=11178 limit 1
select * from catalog_photo where idt=11178 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=1295 limit 1
select * from catalog_photo where idt=1295 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=24789 limit 1
select * from catalog_photo where idt=24789 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=24788 limit 1
select * from catalog_photo where idt=24788 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=24674 limit 1
select * from catalog_photo where idt=24674 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=24673 limit 1
select * from catalog_photo where idt=24673 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=24427 limit 1
select * from catalog_photo where idt=24427 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=24425 limit 1
select * from catalog_photo where idt=24425 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=24418 limit 1
select * from catalog_photo where idt=24418 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=24417 limit 1
select * from catalog_photo where idt=24417 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=24229 limit 1
select * from catalog_photo where idt=24229 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=24225 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=24224 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=24223 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=24219 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=23924 limit 1
select * from catalog_photo where idt=23924 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=23923 limit 1
select * from catalog_photo where idt=23923 order by tomain desc, id asc limit 1