Well if my understanding is correct. Coldfusion 8 formats it's JSON a little differently when returned from a query than flexigrid is going to expect. I took the php example and converted it to coldfusion. works pretty well it's just that after i try to page through the results the json is returned to firebug but then the grid just spins and doesn't refresh with the newly returned data. If anyone can explain what might cause this json return to cause the flexigrid to just stall it would be a great help. Thanks in advance. Now on to how I accomplished this. Granted you could put the entire post2.cfm file into a cfc function and invoke that function much like the above user, but I translated the php example I found of this and translated it to cf for anyone who might want to see the initial concepts for doing this in coldfusion.
Well here goes. You obviously need to modify the paths to the your flexigrid css and fleixigrid.js and jquery.js (or google api whatever) to make this work. Comments separate the files needed to make it work. Obviously update your DSN in the query to point to your datasource and make the columns match your DB table and you should be up and running. (This example doesn't deal with adding or deleting) but once you are up and going it shouldn't be to hard to add that in. my needs were to only display them.) <!--------------------------------------------- = index.cfm -----------------------------------> <!---- = flexigrid is displayed on this page -----> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <title>Flexigrid</title> <link rel="stylesheet" type="text/css" href="css/flexigrid.css" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="flexigrid.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#flex1").flexigrid ( { url: 'post2.cfm', dataType: 'json', colModel : [ {display: 'ID', name : 'id', width : 40, sortable : true, align: 'center'}, {display: 'ISO', name : 'iso', width : 40, sortable : true, align: 'center'}, {display: 'Name', name : 'name', width : 180, sortable : true, align: 'left'}, {display: 'Printable Name', name : 'printable_name', width : 120, sortable : true, align: 'left'}, {display: 'ISO3', name : 'iso3', width : 130, sortable : true, align: 'left', hide: true}, {display: 'Number Code', name : 'numcode', width : 80, sortable : true, align: 'right'} ], buttons : [ {separator: true}, {name: 'A', onpress: sortAlpha}, {name: 'B', onpress: sortAlpha}, {name: 'C', onpress: sortAlpha}, {name: 'D', onpress: sortAlpha}, {name: 'E', onpress: sortAlpha}, {name: 'F', onpress: sortAlpha}, {name: 'G', onpress: sortAlpha}, {name: 'H', onpress: sortAlpha}, {name: 'I', onpress: sortAlpha}, {name: 'J', onpress: sortAlpha}, {name: 'K', onpress: sortAlpha}, {name: 'L', onpress: sortAlpha}, {name: 'M', onpress: sortAlpha}, {name: 'N', onpress: sortAlpha}, {name: 'O', onpress: sortAlpha}, {name: 'P', onpress: sortAlpha}, {name: 'Q', onpress: sortAlpha}, {name: 'R', onpress: sortAlpha}, {name: 'S', onpress: sortAlpha}, {name: 'T', onpress: sortAlpha}, {name: 'U', onpress: sortAlpha}, {name: 'V', onpress: sortAlpha}, {name: 'W', onpress: sortAlpha}, {name: 'X', onpress: sortAlpha}, {name: 'Y', onpress: sortAlpha}, {name: 'Z', onpress: sortAlpha} ], searchitems : [ {display: 'ISO', name : 'iso'}, {display: 'Name', name : 'name', isdefault: true} ], sortname: "id", sortorder: "asc", usepager: true, title: 'Countries', useRp: true, rp: 10, showTableToggleBtn: true, width: 700, height: 255 } ); }); function sortAlpha(com) { jQuery('#flex1').flexOptions({newp:1, params: [{name:'letter_pressed', value: com},{name:'qtype',value:$('select [name=qtype]').val()}]}); jQuery("#flex1").flexReload(); } function test(com,grid) { if (com=='Delete') { if($('.trSelected',grid).length>0){ if(confirm('Delete ' + $('.trSelected',grid).length + ' items?')) { var items = $('.trSelected',grid); var itemlist =''; for(i=0;i<items.length;i++){ itemlist+= items[i].id.substr(3)+","; } $.ajax({ type: "POST", dataType: "json", url: "delete.cfm", data: "items="+itemlist, success: function(data){ alert("Query: "+data.query+" - Total affected rows: "+data.total); $("#flex1").flexReload(); } }); } } else { return false; } } else if (com=='Add') { alert('Add New Item Action'); } } </script> </head> <body> <h1>Flexigrid Example Page</h1> <table id="flex1" style="display:none"></table> </body> </html> <!--------------------------------------------- / end of index.cfm -----------------------------------> <!--------------------------------------------- = post2.cfm -----------------------------------> <!---- = this is the post page that has my query and where I manually create the json return string which is served up with cfontent tag -----> <!--- = params ---> <cfparam name="FORM.qtype" default=""> <cfparam name="FORM.letter_pressed" default=""> <cfparam name="FORM.page" default=""> <cfparam name="FORM.rp" default=""> <cfparam name="FORM.sortName" default=""> <cfparam name="FORM.sortOrder" default=""> <cfparam name="FORM.query" default=""> <!--- =set some local vars ---> <cfscript> page = FORM.page; rp = FORM.rp; sortName = FORM.sortName; sortOrder = FORM.sortOrder; </cfscript> <!--- =order by clause ---> <cfset sort = " ORDER BY #sortName# #sortOrder#"> <!--- =starting record for the page currently being displayed ---> <cfset start = (page-1)*rp> <!--- =limit by clause ---> <cfset limit = " LIMIT #start#, #rp#"> <!--- =query to get results based on limit and order by clauses above ---> <cfquery datasource="exapps" name="getCountries"> SELECT id,iso,name,printable_name,iso3,numcode FROM country WHERE 0=0 <cfif FORM.qType NEQ ""> <cfif FORM.Query NEQ ""> AND #FORM.qtype# LIKE '#FORM.query#' </cfif> <cfif FORM.letter_pressed NEQ ""> AND #FORM.qtype# LIKE <cfqueryparam cfsqltype="cf_sql_varchar" value="#FORM.letter_pressed#%"> </cfif> </cfif> #sort# #limit# </cfquery> <!--- get count for paging through results ---> <cfquery datasource="exapps" name="getCount"> SELECT id FROM country WHERE 0=0 <cfif FORM.Query NEQ ""> AND #FORM.qtype# LIKE '#FORM.query#' </cfif> <cfif FORM.letter_pressed NEQ ""> AND #FORM.qtype# LIKE <cfqueryparam cfsqltype="cf_sql_varchar" value="#FORM.letter_pressed#%"> </cfif> #sort# </cfquery> <!---- return the string created below as json it as json ----> <!--- the original php code in which this was modified from included these headers not sure if they are needed in the CF Equivilent format or not header("Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); header("Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" ); header("Cache-Control: no-cache, must-revalidate" ); header("Pragma: no-cache" ); header("Content-type: text/x-json"); ----> <cfoutput> <!------ =cf equivilent of the above php headers (please correct me if my format or syntax is wrong on these ---> <cfset lastModDate = DateFormat(Now(),'ddd, dd mmm YYYY') & ' ' & TimeFormat(DateConvert('local2Utc', Now()), 'HH:mm:ss') & ' GMT'> <cfheader name="Expires" value="#DateAdd('m', -1, Now())#"> <cfheader name="Last-Modified" value="#lastModDate#"> <cfheader name="cache-control" value="must-revalidate"> <cfheader name="Pragma" value="no-cache"> <cfcontent type="text/x-json" /> <!--- =create the json string -----> <cfscript> json = ""; json &= "{"; json &= "page: #page#,"; json &= "total: #getCount.recordCount#,"; json &= "rows: ["; rc = false; </cfscript> <cfloop query="getCountries"> <cfif rc> <cfset json &= ","> </cfif> <cfscript> json &= "{"; json &= "id:'#id#',"; json &= "cell:['#id#','#iso#'"; json &= ",'#name#'"; json &= ",'#printable_name#'"; json &= ",'#iso3#'"; json &= ",'#numcode#']"; json &= "}"; rc = true; </cfscript> </cfloop> <cfset json &= "]"> <cfset json &= "}"> <!--- =print the concatenated string above to be returned to the browser ---> #json# </cfoutput> <!---- for anyone interested here is the sql create table syntax too ---> DROP TABLE IF EXISTS `country`; CREATE TABLE `country` ( `id` int(11) NOT NULL auto_increment, `iso` char(2) NOT NULL, `name` varchar(80) NOT NULL, `printable_name` varchar(80) NOT NULL, `iso3` char(3) default NULL, `numcode` smallint(6) default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=240 DEFAULT CHARSET=latin1; INSERT INTO `country` (`id`,`iso`,`name`,`printable_name`,`iso3`,`numcode`) VALUES (1,'AF','AFGHANISTAN','Afghanistan','AFG',4), (2,'AL','ALBANIA','Albania','ALB',8), (3,'DZ','ALGERIA','Algeria','DZA',12), (4,'AS','AMERICAN SAMOA','American Samoa','ASM',16), (5,'AD','ANDORRA','Andorra','AND',20), (6,'AO','ANGOLA','Angola','AGO',24), (7,'AI','ANGUILLA','Anguilla','AIA',660), (8,'AQ','ANTARCTICA','Antarctica',NULL,NULL), (9,'AG','ANTIGUA AND BARBUDA','Antigua and Barbuda','ATG',28), (10,'AR','ARGENTINA','Argentina','ARG',32), (11,'AM','ARMENIA','Armenia','ARM',51), (12,'AW','ARUBA','Aruba','ABW',533), (13,'AU','AUSTRALIA','Australia','AUS',36), (14,'AT','AUSTRIA','Austria','AUT',40), (15,'AZ','AZERBAIJAN','Azerbaijan','AZE',31), (16,'BS','BAHAMAS','Bahamas','BHS',44), (17,'BH','BAHRAIN','Bahrain','BHR',48), (18,'BD','BANGLADESH','Bangladesh','BGD',50), (19,'BB','BARBADOS','Barbados','BRB',52), (20,'BY','BELARUS','Belarus','BLR',112), (21,'BE','BELGIUM','Belgium','BEL',56), (22,'BZ','BELIZE','Belize','BLZ',84), (23,'BJ','BENIN','Benin','BEN',204), (24,'BM','BERMUDA','Bermuda','BMU',60), (25,'BT','BHUTAN','Bhutan','BTN',64), (26,'BO','BOLIVIA','Bolivia','BOL',68), (27,'BA','BOSNIA AND HERZEGOVINA','Bosnia and Herzegovina','BIH',70), (28,'BW','BOTSWANA','Botswana','BWA',72), (29,'BV','BOUVET ISLAND','Bouvet Island',NULL,NULL), (30,'BR','BRAZIL','Brazil','BRA',76), (31,'IO','BRITISH INDIAN OCEAN TERRITORY','British Indian Ocean Territory',NULL,NULL), (32,'BN','BRUNEI DARUSSALAM','Brunei Darussalam','BRN',96), (33,'BG','BULGARIA','Bulgaria','BGR',100), (34,'BF','BURKINA FASO','Burkina Faso','BFA',854), (35,'BI','BURUNDI','Burundi','BDI',108), (36,'KH','CAMBODIA','Cambodia','KHM',116), (37,'CM','CAMEROON','Cameroon','CMR',120), (38,'CA','CANADA','Canada','CAN',124), (39,'CV','CAPE VERDE','Cape Verde','CPV',132), (40,'KY','CAYMAN ISLANDS','Cayman Islands','CYM',136), (41,'CF','CENTRAL AFRICAN REPUBLIC','Central African Republic','CAF', 140), (42,'TD','CHAD','Chad','TCD',148), (43,'CL','CHILE','Chile','CHL',152), (44,'CN','CHINA','China','CHN',156), (45,'CX','CHRISTMAS ISLAND','Christmas Island',NULL,NULL), (46,'CC','COCOS (KEELING) ISLANDS','Cocos (Keeling) Islands',NULL,NULL), (47,'CO','COLOMBIA','Colombia','COL',170), (48,'KM','COMOROS','Comoros','COM',174), (49,'CG','CONGO','Congo','COG',178), (50,'CD','CONGO, THE DEMOCRATIC REPUBLIC OF THE','Congo, the Democratic Republic of the','COD',180), (51,'CK','COOK ISLANDS','Cook Islands','COK',184), (52,'CR','COSTA RICA','Costa Rica','CRI',188), (53,'CI','COTE D\'IVOIRE','Cote D\'Ivoire','CIV',384), (54,'HR','CROATIA','Croatia','HRV',191), (55,'CU','CUBA','Cuba','CUB',192), (56,'CY','CYPRUS','Cyprus','CYP',196), (57,'CZ','CZECH REPUBLIC','Czech Republic','CZE',203), (58,'DK','DENMARK','Denmark','DNK',208), (59,'DJ','DJIBOUTI','Djibouti','DJI',262), (60,'DM','DOMINICA','Dominica','DMA',212), (61,'DO','DOMINICAN REPUBLIC','Dominican Republic','DOM',214), (62,'EC','ECUADOR','Ecuador','ECU',218), (63,'EG','EGYPT','Egypt','EGY',818), (64,'SV','EL SALVADOR','El Salvador','SLV',222), (65,'GQ','EQUATORIAL GUINEA','Equatorial Guinea','GNQ',226), (66,'ER','ERITREA','Eritrea','ERI',232), (67,'EE','ESTONIA','Estonia','EST',233), (68,'ET','ETHIOPIA','Ethiopia','ETH',231), (69,'FK','FALKLAND ISLANDS (MALVINAS)','Falkland Islands (Malvinas)','FLK',238), (70,'FO','FAROE ISLANDS','Faroe Islands','FRO',234), (71,'FJ','FIJI','Fiji','FJI',242), (72,'FI','FINLAND','Finland','FIN',246), (73,'FR','FRANCE','France','FRA',250), (74,'GF','FRENCH GUIANA','French Guiana','GUF',254), (75,'PF','FRENCH POLYNESIA','French Polynesia','PYF',258), (76,'TF','FRENCH SOUTHERN TERRITORIES','French Southern Territories',NULL,NULL), (77,'GA','GABON','Gabon','GAB',266), (78,'GM','GAMBIA','Gambia','GMB',270), (79,'GE','GEORGIA','Georgia','GEO',268), (80,'DE','GERMANY','Germany','DEU',276), (81,'GH','GHANA','Ghana','GHA',288), (82,'GI','GIBRALTAR','Gibraltar','GIB',292), (83,'GR','GREECE','Greece','GRC',300), (84,'GL','GREENLAND','Greenland','GRL',304), (85,'GD','GRENADA','Grenada','GRD',308), (86,'GP','GUADELOUPE','Guadeloupe','GLP',312), (87,'GU','GUAM','Guam','GUM',316), (88,'GT','GUATEMALA','Guatemala','GTM',320), (89,'GN','GUINEA','Guinea','GIN',324), (90,'GW','GUINEA-BISSAU','Guinea-Bissau','GNB',624), (91,'GY','GUYANA','Guyana','GUY',328), (92,'HT','HAITI','Haiti','HTI',332), (93,'HM','HEARD ISLAND AND MCDONALD ISLANDS','Heard Island and Mcdonald Islands',NULL,NULL), (94,'VA','HOLY SEE (VATICAN CITY STATE)','Holy See (Vatican City State)','VAT',336), (95,'HN','HONDURAS','Honduras','HND',340), (96,'HK','HONG KONG','Hong Kong','HKG',344), (97,'HU','HUNGARY','Hungary','HUN',348), (98,'IS','ICELAND','Iceland','ISL',352), (99,'IN','INDIA','India','IND',356), (100,'ID','INDONESIA','Indonesia','IDN',360), (101,'IR','IRAN, ISLAMIC REPUBLIC OF','Iran, Islamic Republic of','IRN',364), (102,'IQ','IRAQ','Iraq','IRQ',368), (103,'IE','IRELAND','Ireland','IRL',372), (104,'IL','ISRAEL','Israel','ISR',376), (105,'IT','ITALY','Italy','ITA',380), (106,'JM','JAMAICA','Jamaica','JAM',388), (107,'JP','JAPAN','Japan','JPN',392), (108,'JO','JORDAN','Jordan','JOR',400), (109,'KZ','KAZAKHSTAN','Kazakhstan','KAZ',398), (110,'KE','KENYA','Kenya','KEN',404), (111,'KI','KIRIBATI','Kiribati','KIR',296), (112,'KP','KOREA, DEMOCRATIC PEOPLE\'S REPUBLIC OF','Korea, Democratic People\'s Republic of','PRK',408), (113,'KR','KOREA, REPUBLIC OF','Korea, Republic of','KOR',410), (114,'KW','KUWAIT','Kuwait','KWT',414), (115,'KG','KYRGYZSTAN','Kyrgyzstan','KGZ',417), (116,'LA','LAO PEOPLE\'S DEMOCRATIC REPUBLIC','Lao People\'s Democratic Republic','LAO',418), (117,'LV','LATVIA','Latvia','LVA',428), (118,'LB','LEBANON','Lebanon','LBN',422), (119,'LS','LESOTHO','Lesotho','LSO',426), (120,'LR','LIBERIA','Liberia','LBR',430), (121,'LY','LIBYAN ARAB JAMAHIRIYA','Libyan Arab Jamahiriya','LBY', 434), (122,'LI','LIECHTENSTEIN','Liechtenstein','LIE',438), (123,'LT','LITHUANIA','Lithuania','LTU',440), (124,'LU','LUXEMBOURG','Luxembourg','LUX',442), (125,'MO','MACAO','Macao','MAC',446), (126,'MK','MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF','Macedonia, the Former Yugoslav Republic of','MKD',807), (127,'MG','MADAGASCAR','Madagascar','MDG',450), (128,'MW','MALAWI','Malawi','MWI',454), (129,'MY','MALAYSIA','Malaysia','MYS',458), (130,'MV','MALDIVES','Maldives','MDV',462), (131,'ML','MALI','Mali','MLI',466), (132,'MT','MALTA','Malta','MLT',470), (133,'MH','MARSHALL ISLANDS','Marshall Islands','MHL',584), (134,'MQ','MARTINIQUE','Martinique','MTQ',474), (135,'MR','MAURITANIA','Mauritania','MRT',478), (136,'MU','MAURITIUS','Mauritius','MUS',480), (137,'YT','MAYOTTE','Mayotte',NULL,NULL), (138,'MX','MEXICO','Mexico','MEX',484), (139,'FM','MICRONESIA, FEDERATED STATES OF','Micronesia, Federated States of','FSM',583), (140,'MD','MOLDOVA, REPUBLIC OF','Moldova, Republic of','MDA',498), (141,'MC','MONACO','Monaco','MCO',492), (142,'MN','MONGOLIA','Mongolia','MNG',496), (143,'MS','MONTSERRAT','Montserrat','MSR',500), (144,'MA','MOROCCO','Morocco','MAR',504), (145,'MZ','MOZAMBIQUE','Mozambique','MOZ',508), (146,'MM','MYANMAR','Myanmar','MMR',104), (147,'NA','NAMIBIA','Namibia','NAM',516), (148,'NR','NAURU','Nauru','NRU',520), (149,'NP','NEPAL','Nepal','NPL',524), (150,'NL','NETHERLANDS','Netherlands','NLD',528), (151,'AN','NETHERLANDS ANTILLES','Netherlands Antilles','ANT',530), (152,'NC','NEW CALEDONIA','New Caledonia','NCL',540), (153,'NZ','NEW ZEALAND','New Zealand','NZL',554), (154,'NI','NICARAGUA','Nicaragua','NIC',558), (155,'NE','NIGER','Niger','NER',562), (156,'NG','NIGERIA','Nigeria','NGA',566), (157,'NU','NIUE','Niue','NIU',570), (158,'NF','NORFOLK ISLAND','Norfolk Island','NFK',574), (159,'MP','NORTHERN MARIANA ISLANDS','Northern Mariana Islands','MNP', 580), (160,'NO','NORWAY','Norway','NOR',578), (161,'OM','OMAN','Oman','OMN',512), (162,'PK','PAKISTAN','Pakistan','PAK',586), (163,'PW','PALAU','Palau','PLW',585), (164,'PS','PALESTINIAN TERRITORY, OCCUPIED','Palestinian Territory, Occupied',NULL,NULL), (165,'PA','PANAMA','Panama','PAN',591), (166,'PG','PAPUA NEW GUINEA','Papua New Guinea','PNG',598), (167,'PY','PARAGUAY','Paraguay','PRY',600), (168,'PE','PERU','Peru','PER',604), (169,'PH','PHILIPPINES','Philippines','PHL',608), (170,'PN','PITCAIRN','Pitcairn','PCN',612), (171,'PL','POLAND','Poland','POL',616), (172,'PT','PORTUGAL','Portugal','PRT',620), (173,'PR','PUERTO RICO','Puerto Rico','PRI',630), (174,'QA','QATAR','Qatar','QAT',634), (175,'RE','REUNION','Reunion','REU',638), (176,'RO','ROMANIA','Romania','ROM',642), (177,'RU','RUSSIAN FEDERATION','Russian Federation','RUS',643), (178,'RW','RWANDA','Rwanda','RWA',646), (179,'SH','SAINT HELENA','Saint Helena','SHN',654), (180,'KN','SAINT KITTS AND NEVIS','Saint Kitts and Nevis','KNA',659), (181,'LC','SAINT LUCIA','Saint Lucia','LCA',662), (182,'PM','SAINT PIERRE AND MIQUELON','Saint Pierre and Miquelon','SPM',666), (183,'VC','SAINT VINCENT AND THE GRENADINES','Saint Vincent and the Grenadines','VCT',670), (184,'WS','SAMOA','Samoa','WSM',882), (185,'SM','SAN MARINO','San Marino','SMR',674), (186,'ST','SAO TOME AND PRINCIPE','Sao Tome and Principe','STP',678), (187,'SA','SAUDI ARABIA','Saudi Arabia','SAU',682), (188,'SN','SENEGAL','Senegal','SEN',686), (189,'CS','SERBIA AND MONTENEGRO','Serbia and Montenegro',NULL,NULL), (190,'SC','SEYCHELLES','Seychelles','SYC',690), (191,'SL','SIERRA LEONE','Sierra Leone','SLE',694), (192,'SG','SINGAPORE','Singapore','SGP',702), (193,'SK','SLOVAKIA','Slovakia','SVK',703), (194,'SI','SLOVENIA','Slovenia','SVN',705), (195,'SB','SOLOMON ISLANDS','Solomon Islands','SLB',90), (196,'SO','SOMALIA','Somalia','SOM',706), (197,'ZA','SOUTH AFRICA','South Africa','ZAF',710), (198,'GS','SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS','South Georgia and the South Sandwich Islands',NULL,NULL), (199,'ES','SPAIN','Spain','ESP',724), (200,'LK','SRI LANKA','Sri Lanka','LKA',144), (201,'SD','SUDAN','Sudan','SDN',736), (202,'SR','SURINAME','Suriname','SUR',740), (203,'SJ','SVALBARD AND JAN MAYEN','Svalbard and Jan Mayen','SJM', 744), (204,'SZ','SWAZILAND','Swaziland','SWZ',748), (205,'SE','SWEDEN','Sweden','SWE',752), (206,'CH','SWITZERLAND','Switzerland','CHE',756), (207,'SY','SYRIAN ARAB REPUBLIC','Syrian Arab Republic','SYR',760), (208,'TW','TAIWAN, PROVINCE OF CHINA','Taiwan, Province of China','TWN',158), (209,'TJ','TAJIKISTAN','Tajikistan','TJK',762), (210,'TZ','TANZANIA, UNITED REPUBLIC OF','Tanzania, United Republic of','TZA',834), (211,'TH','THAILAND','Thailand','THA',764), (212,'TL','TIMOR-LESTE','Timor-Leste',NULL,NULL), (213,'TG','TOGO','Togo','TGO',768), (214,'TK','TOKELAU','Tokelau','TKL',772), (215,'TO','TONGA','Tonga','TON',776), (216,'TT','TRINIDAD AND TOBAGO','Trinidad and Tobago','TTO',780), (217,'TN','TUNISIA','Tunisia','TUN',788), (218,'TR','TURKEY','Turkey','TUR',792), (219,'TM','TURKMENISTAN','Turkmenistan','TKM',795), (220,'TC','TURKS AND CAICOS ISLANDS','Turks and Caicos Islands','TCA', 796), (221,'TV','TUVALU','Tuvalu','TUV',798), (222,'UG','UGANDA','Uganda','UGA',800), (223,'UA','UKRAINE','Ukraine','UKR',804), (224,'AE','UNITED ARAB EMIRATES','United Arab Emirates','ARE',784), (225,'GB','UNITED KINGDOM','United Kingdom','GBR',826), (226,'US','UNITED STATES','United States','USA',840), (227,'UM','UNITED STATES MINOR OUTLYING ISLANDS','United States Minor Outlying Islands',NULL,NULL), (228,'UY','URUGUAY','Uruguay','URY',858), (229,'UZ','UZBEKISTAN','Uzbekistan','UZB',860), (230,'VU','VANUATU','Vanuatu','VUT',548), (231,'VE','VENEZUELA','Venezuela','VEN',862), (232,'VN','VIET NAM','Viet Nam','VNM',704), (233,'VG','VIRGIN ISLANDS, BRITISH','Virgin Islands, British','VGB', 92), (234,'VI','VIRGIN ISLANDS, U.S.','Virgin Islands, U.s.','VIR',850), (235,'WF','WALLIS AND FUTUNA','Wallis and Futuna','WLF',876), (236,'EH','WESTERN SAHARA','Western Sahara','ESH',732), (237,'YE','YEMEN','Yemen','YEM',887), (238,'ZM','ZAMBIA','Zambia','ZMB',894), (239,'ZW','ZIMBABWE','Zimbabwe','ZWE',716);