Столы и стулья
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=18058 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20113 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=664 limit 1
select * from catalog_photo where idt=664 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=666 limit 1
select * from catalog_photo where idt=666 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=11930 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20114 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=23053 limit 1
select * from catalog_photo where idt=23053 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=23054 limit 1
select * from catalog_photo where idt=23054 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=22286 limit 1
select * from catalog_photo where idt=22286 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=22287 limit 1
select * from catalog_photo where idt=22287 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=23055 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=678 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=677 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20113 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=664 limit 1
select * from catalog_photo where idt=664 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=666 limit 1
select * from catalog_photo where idt=666 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=11930 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=20114 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=23053 limit 1
select * from catalog_photo where idt=23053 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=23054 limit 1
select * from catalog_photo where idt=23054 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=22286 limit 1
select * from catalog_photo where idt=22286 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=22287 limit 1
select * from catalog_photo where idt=22287 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=23055 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=678 limit 1
select st1+st2+st3+st4+st5 as count, st5 as sklad 0 as stor from catalog_params where idt=677 limit 1