begin = ("CREATE TABLE `" + agency + "` (" "`agency_name` varchar(100) character set utf8 NOT NULL default 'New'," "`flats_date` date NOT NULL default '0000-00-00'," "`sale_name` varchar(15) character set utf8 default NULL," "`region_name` varchar(21) character set utf8 NOT NULL default '-'," "`street_name` varchar(255) character set utf8 NOT NULL default ''," "`So` float NOT NULL default '1'," "`Height` float NOT NULL default '2.4'," "`flats_privacy` tinyint(1) NOT NULL default '0'," "`flats_price` int(7) NOT NULL default '0'," "`chance` tinyint(1) NOT NULL default '0'," "`build_equip` tinyint(1) NOT NULL default '0'," "`electro` tinyint(1) NOT NULL default '0'," "`water_cold` tinyint(1) NOT NULL default '0'," "`water_hot` tinyint(1) NOT NULL default '0'," "`water_drain` tinyint(1) NOT NULL default '0'," "`flats_cod` int(2) NOT NULL default '0'," "`type_s` varchar(21) default NULL," "`flats_ex` tinyint(1) NOT NULL default '0'," "`agent_name` varchar(255) character set utf8 NOT NULL default 'New'," "`flats_confid` varchar(255) default NULL," "`flats_pm2` float NOT NULL default '1'," "`flats_comments` varchar(255) default NULL"") ENGINE=MyISAM DEFAULT CHARSET=utf8;"); modelQuery->setQuery( begin ); begin = ( "INSERT INTO " + agency + "(agency_name, flats_date, sale_name, region_name, street_name, " "So, Height, flats_privacy, flats_price, chance, build_equip, electro, water_cold, water_hot, water_drain, flats_cod, " "type_s, flats_ex, agent_name, flats_confid, flats_pm2, flats_comments) SELECT g.agency_name, " "f.flats_date, k.sale_name, a.region_name, s.street_name, f.So, f.Height, flats_privacy, (f.flats_price + " + txtMarket + ")*" + txtCurss + ", " "f.chance, f.build_equip, f.electro, f.water_cold, f.water_hot, f.water_drain, f.flats_cod, t.type_s, " "f.flats_ex, n.agent_name, f.flats_confid, (f.flats_price/f.So)*" + txtCurss + ", f.flats_comments " "FROM tbl_flats f, tbl_type t, tbl_sale k, tbl_region a, tbl_street s, tbl_agency g, tbl_agent n " + tblregion + tblstreet + tblagenci + tbltype + " WHERE f.type_cod = t.type_cod AND f.sale_cod = k.sale_cod AND f.street_cod = s.street_cod " "AND s.region_cod = a.region_cod AND f.agent_cod = n.agent_cod AND n.agency_cod = g.agency_cod" + agenci + type + region + street + So + schP + txtAnalis + txtPrivate + txtSale + txtChance + txtElectro + txtWater + txtDrain + txtBuild + txtEx + txtNomore + txtOndate + txtAgent); modelQuery->setQuery( begin );