41d40 < var icol=0; 44d42 < var wherestype=[]; 55,56d52 < var sqlisyellow=''; < var headrec=''; 121,157d116 < function analwheres() { < var ji=0; < var wheresijfrom=''; < var lefties=eval('' + document.getElementById('thname').innerHTML.split(',').length); < //alert('lefties=' + lefties); < for (var ij=0; ij')[0].split('!')[0].split('=')[0]; < if (eval('' + wheresijfrom) <= lefties && wherestype[ij] != 'text') { < for (ji=0; ji lefties && wherestype[ij] == 'text') { < for (ji=0; ji sqlis+=document.getElementById('thname').innerHTML; > sqlis+=',' + document.getElementById('thquantity').innerHTML + ' '; 171,172c126 < sqlis+=document.getElementById('thname').innerHTML.toLowerCase(); < sqlisyellow+=document.getElementById('thname').innerHTML.split(',')[0].toLowerCase(); --- > sqlis+=document.getElementById('thname').innerHTML; 174,175c128 < sqlis+=',' + document.getElementById('thquantity').innerHTML.toLowerCase(); < sqlisyellow+=',' + document.getElementById('thquantity').innerHTML.split(',')[0].toLowerCase(); --- > sqlis+=',' + document.getElementById('thquantity').innerHTML; 177,180c130,131 < sqlis+=document.getElementById('thname').innerHTML.toLowerCase(); < sqlis+=',(' + document.getElementById('thquantity').innerHTML.toLowerCase() + ') as field2 '; < sqlisyellow+=document.getElementById('thname').innerHTML.split(',')[0].toLowerCase(); < sqlisyellow+=',' + document.getElementById('thquantity').innerHTML.split(',')[0].toLowerCase(); --- > sqlis+=document.getElementById('thname').innerHTML; > sqlis+=',(' + document.getElementById('thquantity').innerHTML + ') as field2 '; 187d137 < analwheres(); 191d140 < console.log(mappings); 193d141 < //alert(mappings[jk].from + ' to ' + mappings[jk].to + ' ... *' + wheres[ij] + '*'); 199d146 < sqlisyellow+=' WHERE ' + wheres[ij].trim().replace(/^\!/g, ' NOT ') + ' '; 202d148 < sqlisyellow+=' AND ' + wheres[ij].trim().replace(/^\!/g, ' NOT ') + ' '; 207d152 < //analwheres(); 208a154 > ordersbyn.push(ordersby[ij]); 210c156 < orderbys[ij]=asit(orderbys[ij].replace('~' + mappings[jk].from + ' ', '~' + mappings[jk].to + ' ').replace('|' + mappings[jk].from + ' ', '|' + mappings[jk].to + ' ').replace(' ' + mappings[jk].from + ' ', ' ' + mappings[jk].to + ' ')); --- > orderbys[ij]=asit(orderbys[ij].replace(' ' + mappings[jk].from, ' ' + mappings[jk].to)); 214,215c160 < sqlis+=' ORDER BY ' + orderbys[ij].trim().replace(/\~/g, '').replace(/\|/g, '') + ' ASC '; < sqlisyellow+=' ORDER BY ' + orderbys[ij].trim().replace(/\~/g, '').replace(/\|/g, '') + ' ASC '; --- > sqlis+=' ORDER BY ' + orderbys[ij].trim().replace(/\~/g, '').replace(/\`/g, '') + ' ASC '; 217,218c162 < sqlis+=' ORDER BY ' + orderbys[ij].trim().replace(/\~/g, '').replace(/\|/g, '') + ' DESC '; < sqlisyellow+=' ORDER BY ' + orderbys[ij].trim().replace(/\~/g, '').replace(/\|/g, '') + ' DESC '; --- > sqlis+=' ORDER BY ' + orderbys[ij].trim().replace(/\~/g, '').replace(/\`/g, '') + ' DESC '; 222,223c166 < sqlis+=' AND ' + orderbys[ij].trim().replace(/\~/g, '').replace(/\|/g, '') + ' ASC '; < sqlisyellow+=' AND ' + orderbys[ij].trim().replace(/\~/g, '').replace(/\|/g, '') + ' ASC '; --- > sqlis+=' AND ' + orderbys[ij].trim().replace(/\~/g, '').replace(/\`/g, '') + ' ASC '; 225,226c168 < sqlis+=' AND ' + orderbys[ij].trim().replace(/\~/g, '').replace(/\|/g, '') + ' DESC '; < sqlisyellow+=' AND ' + orderbys[ij].trim().replace(/\~/g, '').replace(/\|/g, '') + ' DESC '; --- > sqlis+=' AND ' + orderbys[ij].trim().replace(/\~/g, '').replace(/\`/g, '') + ' DESC '; 234,235d175 < sqlisyellow+=' GROUP BY (' + asit(mappingsget('' + eval(1 + lefties))) + ' > ' + tippingpoint + ') OR (' + asit(asit(mappingsget('' + eval(1 + lefties)))) + ' <= ' + tippingpoint + ') '; < document.getElementById('demo').title=sqlisyellow; 243c183 < return '' + mappings[ij].to; --- > return true; 246c186 < return null; --- > return false; 250,251c190 < var lefties=eval('' + document.getElementById('thname').innerHTML.split(',').length); < if (!mappingsget('' + eval(1 + lefties)) || undone) { --- > if (!mappingsget("2") || undone) { 253c192 < eval('mappings.unshift({ from: "' + eval(1 + lefties) + '", to:"' + '(' + twocomp + ') as field2' + '"})'); --- > eval('mappings.unshift({ from: "2", to:"' + '(' + twocomp + ') as field2' + '"})'); 259c198 < eval('mappings.push({ from: "' + eval(1 + lefties) + '", to:"' + '(' + twocomp + ') as field2' + '"})'); --- > eval('mappings.push({ from: "2", to:"' + '(' + twocomp + ') as field2' + '"})'); 262c201 < eval('mappings.push({ from: "' + eval(1 + lefties) + '", to:"' + '(' + twocomp + ') as field2' + '"})'); --- > eval('mappings.push({ from: "2", to:"' + '(' + twocomp + ') as field2' + '"})'); 265c204 < eval('mappings.unshift({ from: "' + eval(1 + lefties) + '", to:"' + '(' + twocomp + ') as field2' + '"})'); --- > eval('mappings.unshift({ from: "2", to:"' + '(' + twocomp + ') as field2' + '"})'); 464d402 < //analwheres(); 478,479c416 < var indemo=null, indemotwo=null;; < var lefties=eval('' + document.getElementById('thname').innerHTML.split(',').length); --- > var indemo=null; 482d418 < indemotwo=document.getElementById('thquantity'); 484,489c420 < outstuff+='?thname=' + encodeURIComponent(('' + (indemo.innerHTML.split(',')[0]))) < if (indemo.innerHTML != indemo.innerHTML.split(',')[0] && indemotwo.innerHTML != indemotwo.innerHTML.split(',')[0] && outstuff.indexOf('sql=') == -1) { < outstuff+='&sql=' + encodeURIComponent(sqlis.replace(indemo.innerHTML,indemo.innerHTML.split(',')[0]).replace(indemotwo.innerHTML,indemotwo.innerHTML.split(',')[0])); < } else if (indemo.innerHTML != indemo.innerHTML.split(',')[0] && outstuff.indexOf('sql=') == -1) { < outstuff+='&sql=' + encodeURIComponent(sqlis.replace(indemo.innerHTML,indemo.innerHTML.split(',')[0])); < } --- > outstuff+='?thname=' + encodeURIComponent(('' + (indemo.innerHTML))) 491,496c422 < outstuff+='&thname=' + encodeURIComponent(('' + (indemo.innerHTML.split(',')[0]))) < if (indemo.innerHTML != indemo.innerHTML.split(',')[0] && indemotwo.innerHTML != indemotwo.innerHTML.split(',')[0] && outstuff.indexOf('sql=') == -1) { < outstuff+='&sql=' + encodeURIComponent(sqlis.replace(indemo.innerHTML,indemo.innerHTML.split(',')[0]).replace(indemotwo.innerHTML,indemotwo.innerHTML.split(',')[0])); < } else if (indemo.innerHTML != indemo.innerHTML.split(',')[0] && outstuff.indexOf('sql=') == -1) { < outstuff+='&sql=' + encodeURIComponent(sqlis.replace(indemo.innerHTML,indemo.innerHTML.split(',')[0])); < } --- > outstuff+='&thname=' + encodeURIComponent(('' + (indemo.innerHTML))) 500,503c426 < if (indemo.innerHTML != indemo.innerHTML.split(',')[0] && outstuff.indexOf('sql=') == -1) { < outstuff+='&sql=' + encodeURIComponent(sqlis.replace(indemo.innerHTML,indemo.innerHTML.split(',')[0])); < } < outstuff+='?thquantity=' + encodeURIComponent(('' + (indemo.innerHTML.split(',')[0]))) --- > outstuff+='?thquantity=' + encodeURIComponent(('' + (indemo.innerHTML))) 505,508c428 < if (indemo.innerHTML != indemo.innerHTML.split(',')[0] && outstuff.indexOf('sql=') == -1) { < outstuff+='&sql=' + encodeURIComponent(sqlis.replace(indemo.innerHTML,indemo.innerHTML.split(',')[0])); < } < outstuff+='&thquantity=' + encodeURIComponent(('' + (indemo.innerHTML.split(',')[0]))) --- > outstuff+='&thquantity=' + encodeURIComponent(('' + (indemo.innerHTML))) 522,531d441 < if (outstuff.indexOf('sql=') == -1) { < outstuff+='&sql=' + encodeURIComponent(sqlis); < sqlisyellow=sqlis + ' GROUP BY (' + asit(mappingsget('' + eval(1 + lefties))) + ' > ' + tippingpoint + ') OR (' + asit(mappingsget('' + eval(1 + lefties))) + ' <= ' + tippingpoint + ') '; < outstuff+='&sqlyellow=' + encodeURIComponent(sqlisyellow); < document.getElementById('demo').title=sqlisyellow; < } else { < sqlisyellow=decodeURIComponent(outstuff.split('sql=')[1].split('&')[0]) + ' GROUP BY (' + asit(mappingsget('' + eval(1 + lefties))) + ' > ' + tippingpoint + ') OR (' + asit(mappingsget('' + eval(1 + lefties))) + ' <= ' + tippingpoint + ') '; < outstuff+='&sqlyellow=' + encodeURIComponent(sqlisyellow); < document.getElementById('demo').title=sqlisyellow; < } 598,604d507 < function ee(inid) { < if ((inid + ' ').substring(0,1) == '=' && (inid + ' ').substring(1).substring(0,1) != '=') { < return '=' + inid; < } < return inid; < } < 607,609d509 < var wheresijfrom=''; < var recok=true, thisok=true; < var myrec=''; 612d511 < var wi=wheres.length, jwi=0; 617,645d515 < if (wi > 0) { < analwheres(); < myrec=('"' + maybenotvaln(knownname).replace(/\,/g,'","') + '","' + maybenotvalq(('' + knownquantity), knownname).replace(/\,$/g, '').replace(/\,/g,'","') + '"'); < myfields=myrec.split('","'); < myfields[0]=myfields[0].replace(/^\"/g,''); < myfields[eval(-1 + myfields.length)]=myfields[eval(-1 + myfields.length)].replace(/\"$/g,''); < thisok=true; < for (jwi=0; jwi')[0].split('!')[0].split('=')[0]; < if (thisok) { < if (wherestype[jwi] != 'text') { < if (wheres[jwi].trim().substring(0,1) == '!') { < eval('thisok=((' + myfields[eval(-1 + eval('' + wheresijfrom))] + ee(wheres[jwi].replace(/^\!/g,'').replace(wheres[jwi].trim().replace(/^\!/g,'').split('<')[0].split('>')[0].split('!')[0].split('=')[0],'').trim(),'') + ') ? false : true)'); < } else { < eval('thisok=((' + myfields[eval(-1 + eval('' + wheresijfrom))] + ee(wheres[jwi].replace(/^\!/g,'').replace(wheres[jwi].trim().replace(/^\!/g,'').split('<')[0].split('>')[0].split('!')[0].split('=')[0],'').trim(),'') + ') ? true : false)'); < } < } else { < if (wheres[jwi].trim().substring(0,1) == '!') { < eval('thisok=(("' + myfields[eval(-1 + eval('' + wheresijfrom))] + '"' + ee(wheres[jwi].replace(/^\!/g,'').replace(wheres[jwi].trim().replace(/^\!/g,'').split('<')[0].split('>')[0].split('!')[0].split('=')[0],'').trim(),'') + ') ? false : true)'); < } else { < //alert('Thisok=((' + myfields[eval(-1 + eval('' + wheresijfrom))] + ee(wheres[jwi].replace(wheres[jwi].trim().replace(/^\!/g,'').split('<')[0].split('>')[0].split('!')[0].split('=')[0],'').trim(),'') + ') ? true : false)'); < eval('thisok=(("' + myfields[eval(-1 + eval('' + wheresijfrom))] + '"' + ee(wheres[jwi].replace(/^\!/g,'').replace(wheres[jwi].trim().replace(/^\!/g,'').split('<')[0].split('>')[0].split('!')[0].split('=')[0],'').trim(),'') + ') ? true : false)'); < } < } < } < } < recok=thisok; < } < if (recok) { 650d519 < } 652,681d520 < if (wi > 0) { < analwheres(); < myrec=('"' + maybenotvaln(knownname).replace(/\,/g,'","') + '","' + maybenotvalq(('' + knownquantity), knownname).replace(/\,$/g, '').replace(/\,/g,'","') + '"'); < myfields=myrec.split('","'); < myfields[0]=myfields[0].replace(/^\"/g,''); < myfields[eval(-1 + myfields.length)]=myfields[eval(-1 + myfields.length)].replace(/\"$/g,''); < thisok=true; < for (jwi=0; jwi')[0].split('!')[0].split('=')[0]; < if (thisok) { < if (wherestype[jwi] != 'text') { < if (wheres[jwi].trim().substring(0,1) == '!') { < eval('thisok=((' + myfields[eval(-1 + eval('' + wheresijfrom))] + ee(wheres[jwi].replace(wheres[jwi].trim().replace(/^\!/g,'').split('<')[0].split('>')[0].split('!')[0].split('=')[0],'').trim(),'') + ') ? false : true)'); < } else { < //alert(wheresijfrom + ' ' + myrec); // + ' thisok=((' + myfields[eval(-1 + eval('' + wheresijfrom))] + ee(wheres[jwi].replace(wheres[jwi].trim().replace(/^\!/g,'').split('<')[0].split('>')[0].split('!')[0].split('=')[0],'').trim(),'') + ') ? true : false)'); < //alert(wheresijfrom + ' ' + myrec + ' thisok=((' + myfields[eval(-1 + eval('' + wheresijfrom))] + ee(wheres[jwi].replace(wheres[jwi].trim().replace(/^\!/g,'').split('<')[0].split('>')[0].split('!')[0].split('=')[0],'').trim(),'') + ') ? true : false)'); < eval('thisok=((' + myfields[eval(-1 + eval('' + wheresijfrom))] + ee(wheres[jwi].replace(wheres[jwi].trim().replace(/^\!/g,'').split('<')[0].split('>')[0].split('!')[0].split('=')[0],'').trim(),'') + ') ? true : false)'); < } < } else { < if (wheres[jwi].trim().substring(0,1) == '!') { < eval('thisok=(("' + myfields[eval(-1 + eval('' + wheresijfrom))] + '"' + ee(wheres[jwi].replace(wheres[jwi].trim().replace(/^\!/g,'').split('<')[0].split('>')[0].split('!')[0].split('=')[0],'').trim(),'') + ') ? false : true)'); < } else { < eval('thisok=(("' + myfields[eval(-1 + eval('' + wheresijfrom))] + '"' + ee(wheres[jwi].replace(wheres[jwi].trim().replace(/^\!/g,'').split('<')[0].split('>')[0].split('!')[0].split('=')[0],'').trim(),'') + ') ? true : false)'); < } < } < } < } < recok=thisok; < } < if (recok) { 687d525 < } 994,995d831 < sqlis=location.search.split('sql=')[1] ? (decodeURIComponent(location.search.split('sql=')[1].split('&')[0].split('#')[0])) : ''; < sqlisyellow=location.search.split('sqlyellow=')[1] ? (decodeURIComponent(location.search.split('sqlyellow=')[1].split('&')[0].split('#')[0])) : ''; 998,999d833 < if (sqlis != '') { document.body.title=sqlis; } < if (sqlisyellow != '') { document.getElementById('demo').title=sqlisyellow; } 1055c889 < xenterall=prompt('Optionally enter a # (hashtag) delimited composite field scenario to apply for next input data (perhaps CSV) file application, such as in examples below where +-*^%/ (maths) and !<>= (conditions) and ~| (for ascending descending order). ' + String.fromCharCode(10) + 'Examples ...' + String.fromCharCode(10) + '#1,3&2&4' + String.fromCharCode(10) + '#4,2*3' + String.fromCharCode(10) + '#1&4,3+2' + String.fromCharCode(10) + '#1&4,3&2,2>100,|2', ''); --- > xenterall=prompt('Optionally enter a # (hashtag) delimited composite field scenario to apply for next input data (perhaps CSV) file application, such as in examples below. ' + String.fromCharCode(10) + String.fromCharCode(10) + 'Examples ...' + String.fromCharCode(10) + '#1,3&2&4' + String.fromCharCode(10) + '#4,2*3' + String.fromCharCode(10) + '#1&4,3+2', ''); 1074c908 < var csfs=compstuff.split(','), tw=''; --- > var csfs=compstuff.split(','); 1077,1082d910 < tw=csfs[ibn].split(csfs[ibn].trim().replace(/^\!/g,'').split('!')[0].split('<')[0].split('>')[0].split('=')[0])[1].replace(/^\!/g,'').replace(/^\/g,'').replace(/^\=/g,'').replace(/^\=/g,''); < if ((tw + ' ').substring(0,1).replace('"',"'") == "'") { < wherestype.push('text'); < } else { < wherestype.push('number'); < } 1091,1092c919,920 < } else if (csfs[ibn].replace('~','|').indexOf('|') != -1) { // order by < orderbys.push(' ' + (csfs[ibn] + ' ').replace('| ','|1 ').replace('~ ','~1 ')); --- > } else if (csfs[ibn].replace('~','`').indexOf('`') != -1) { // order by > orderbys.push(' ' + csfs[ibn]); 1302c1130 < askall(maybesort(extractContent(icontent,true))); --- > askall(extractContent(icontent,true)); 1304c1132 < askall(maybesort(icontent)); --- > askall(icontent); 1307c1135 < askall(maybesort(restis)); --- > askall(restis); 1309d1136 < alertsql(); 1311c1138 < } --- > } 1385c1212 < return encodeURIComponent(('' + compm)).replace(/\'/g,'|').replace(encodeURIComponent(','),',').replace(encodeURIComponent(','),',').replace(encodeURIComponent(','),',').replace(encodeURIComponent(','),',').replace(encodeURIComponent(','),',').replace(encodeURIComponent(','),',').replace(encodeURIComponent(','),',').replace(encodeURIComponent(','),',').replace(encodeURIComponent(','),',').replace(encodeURIComponent(','),','); --- > return encodeURIComponent(('' + compm)).replace(/\'/g,'`').replace(encodeURIComponent(','),',').replace(encodeURIComponent(','),',').replace(encodeURIComponent(','),',').replace(encodeURIComponent(','),',').replace(encodeURIComponent(','),',').replace(encodeURIComponent(','),',').replace(encodeURIComponent(','),',').replace(encodeURIComponent(','),',').replace(encodeURIComponent(','),',').replace(encodeURIComponent(','),','); 1394c1221 < return ('' + compv).split(',')[0] + '|' + ('' + compv).split(',')[1] + '|~' + (compm).split(',')[0].replace(/\'/g,'|').replace(/\ /g,'%20'); // .replace(/\%20/g,'+'); --- > return ('' + compv).split(',')[0] + '|' + ('' + compv).split(',')[1] + '|~' + (compm).split(',')[0].replace(/\'/g,'`').replace(/\ /g,'%20'); // .replace(/\%20/g,'+'); 1397c1224 < return ('' + compv).split(',')[1] + '|' + ('' + compv).split(',')[0] + '|~' + (compm).split(',')[0].replace(/\'/g,'|').replace(/\ /g,'%20'); // .replace(/\%20/g,'+'); --- > return ('' + compv).split(',')[1] + '|' + ('' + compv).split(',')[0] + '|~' + (compm).split(',')[0].replace(/\'/g,'`').replace(/\ /g,'%20'); // .replace(/\%20/g,'+'); 1407c1234 < return encodeURIComponent(compm.split(',')[eval(-1 + compm.split(',').length)].replace(/\'/g,'|')); // .replace(/\%20/g,'+'); --- > return encodeURIComponent(compm.split(',')[eval(-1 + compm.split(',').length)].replace(/\'/g,'`')); // .replace(/\%20/g,'+'); 1414c1241 < return encodeURIComponent(('' + compm).split(',')[0].replace(/\'/g,'|').replace(/\[/g,' ').replace(/\]/g,' ')); --- > return encodeURIComponent(('' + compm).split(',')[0].replace(/\'/g,'`').replace(/\[/g,' ').replace(/\]/g,' ')); 1418c1245 < return (('' + compm)).replace(/\'/g,'|'); --- > return (('' + compm)).replace(/\'/g,'`'); 1422c1249 < return (('' + compm).split(',')[0]).replace(/\'/g,'|'); --- > return (('' + compm).split(',')[0]).replace(/\'/g,'`'); 1590,1708c1417 < < function maybesort(rh) { < var recsare=[], newc='', ijk=0, exa='', zero=0, ipo=0; < headrec=''; < if (eval('' + orderbys.length) > 0) { < recsare=rh.split(String.fromCharCode(10)); < if (recsare[0].indexOf('0') == -1 && recsare[0].indexOf('1') == -1 && recsare[0].indexOf('2') == -1 && recsare[0].indexOf('3') == -1 && recsare[0].indexOf('4') == -1 && recsare[0].indexOf('5') == -1 && recsare[0].indexOf('6') == -1 && recsare[0].indexOf('7') == -1 && recsare[0].indexOf('8') == -1 && recsare[0].indexOf('9') == -1) { < headrec=recsare[0]; < zero=1; < efields=headrec.replace(/\"/g,'').split(','); < for (var ke=0; ke x) { < return 1; < } < return 0; < }); < < } else if (orderbys[ipo].indexOf('|') != -1) { < icol=eval(-1 + eval('' + orderbys[ipo].split('|')[1].split(' ')[0])); < //alert('icol=' + icol); < exa='' + rh.split(String.fromCharCode(10))[zero].split(',')[icol]; < //alert('exa=' + exa); < if (exa != '' && exa.replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'').replace(/\-/g,'').replace(/\./g,'').trim() == '') { < //alert('is a number'); < recsare.sort(function(x, y) { < if (x != headrec && y == headrec) { return 1; } < if (x == headrec && y != headrec) { return -1; } < if (x == headrec && y == headrec) { return 0; } < if (eval('' + y.split(',')[icol]) < eval('' + x.split(',')[icol])) { < return -1; < } < if (eval('' + y.split(',')[icol]) > eval('' + x.split(',')[icol])) { < return 1; < } < return 0; < }); < } else { < recsare.sort(function(x, y) { < if (y.split(',')[icol] < x.split(',')[icol]) { < return -1; < } < if (y.split(',')[icol] > x.split(',')[icol]) { < return 1; < } < return 0; < }); < } < < } else if (orderbys[ipo].indexOf('~') != -1) { < < < < < icol=eval(-1 + eval('' + orderbys[ipo].split('~')[1].split(' ')[0])); < exa='' + rh.split(String.fromCharCode(10))[zero].split(',')[icol]; < if (exa != '' && exa.replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'').replace(/\-/g,'').replace(/\./g,'').trim() == '') { < recsare.sort(function(x, y) { < if (x != headrec && y == headrec) { return -1; } < if (x == headrec && y != headrec) { return 1; } < if (x == headrec && y == headrec) { return 0; } < if (eval('' + x.split(',')[icol]) < eval('' + y.split(',')[icol])) { < return -1; < } < if (eval('' + x.split(',')[icol]) > eval('' + y.split(',')[icol])) { < return 1; < } < return 0; < }); < } else { < recsare.sort(function(x, y) { < if (x.split(',')[icol] < y.split(',')[icol]) { < return -1; < } < if (x.split(',')[icol] > y.split(',')[icol]) { < return 1; < } < return 0; < }); < } < < < < < } < < newc=''; < if (headrec != '') { < newc+=headrec + String.fromCharCode(10); < } < for (ijk=0; ijk 1711,1712d1419 < var recsare=[], newc='', ijk=0, exa='', zero=0; < headrec=''; 1717c1424 < askall(maybesort(rawhtml)); --- > askall(rawhtml);