<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: Missing Operators From Search List.</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/missing-operators-from-search-list</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/help/missing-operators-from-search-list/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>4D on Missing Operators From Search List.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/missing-operators-from-search-list#p24499</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/missing-operators-from-search-list#p24499</guid>
        	        	<description><![CDATA[<p>Ok getting a little closer to finding out what I&#39;ve done wrong.</p>
<p>using jquery.jqGrid.src.js</p>
<p>I&#39;ve found that adding&#160;</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit6357' value='Select Code' data-codeid='sfcode6357' /></p>
<div class='sfcode' id='sfcode6357'>&#39;lt&#39;, &#39;le&#39;, &#39;gt&#39;, &#39;ge&#39;,</div>
<p>to</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit728' value='Select Code' data-codeid='sfcode728' /></p>
<div class='sfcode' id='sfcode728'>stropts : [&#39;eq&#39;, &#39;ne&#39;, &#39;bw&#39;, &#39;bn&#39;, &#39;ew&#39;, &#39;en&#39;, &#39;cn&#39;, &#39;nc&#39;, &#39;nu&#39;, &#39;nn&#39;, &#39;in&#39;, &#39;ni&#39;],</div>
<p>enables the operators in the list.</p>
<p>So I could now do with knowing what <strong>stropts </strong>and <strong>numopts </strong>are as the missing ones are listed under <strong>numopts</strong>.</p>
<p>I&#39;m guessing that it&#39;s perhaps to do with data types or something?</p>
]]></description>
        	        	<pubDate>Thu, 01 Sep 2011 13:55:42 +0300</pubDate>
        </item>
        <item>
        	<title>4D on Missing Operators From Search List.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/missing-operators-from-search-list#p24467</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/missing-operators-from-search-list#p24467</guid>
        	        	<description><![CDATA[<div style="background-color: #ffffff; color: #000000; font-family: Tahoma,Helvetica,Arial,Verdana,sans-serif; font-size: 14px; margin: 3px 8px 0px 15px; padding: 0px;">
<p style="background-color: #ffffff; color: #000000; font-family: Tahoma,Helvetica,Arial,Verdana,sans-serif; font-size: 14px; margin: 3px 8px 0px 0px; padding: 0px 0px 5px;">I have now re-installed the jqgrid scripts.</p>
<p style="background-color: #ffffff; color: #000000; font-family: Tahoma,Helvetica,Arial,Verdana,sans-serif; font-size: 14px; margin: 3px 8px 0px 0px; padding: 0px 0px 5px;">Having also re-read the documentation and changed the script that calls the search to</p>
</div>
<p><input type='button' class='sfcodeselect' name='sfselectit1119' value='Select Code' data-codeid='sfcode1119' /></p>
<div class='sfcode' id='sfcode1119'>jQuery(&#34;#list&#34;).jqGrid({pager:&#39;#pager&#39;}).navGrid(&#39;#pager&#39;,{view:true,add:false,del:false,edit:false},<br />&#160;&#160;&#160; {},<br />&#160;&#160;&#160; {},<br />&#160;&#160;&#160; {},<br />&#160;&#160;&#160; {multipleSearch:true, multipleGroup:true, showQuery:true},<br />&#160;&#160;&#160; {caption: &#34;Search...&#34;,<br />&#160;&#160;&#160;&#160; Find: &#34;Find&#34;,<br />&#160;&#160;&#160;&#160; Reset: &#34;Reset&#34;,<br />&#160;&#160;&#160;&#160; odata : [&#39;equal&#39;, &#39;not equal&#39;, &#39;less&#39;, &#39;less or equal&#39;,&#39;greater&#39;,&#39;greater or equal&#39;, &#39;begins with&#39;,&#39;does not begin with&#39;,&#39;is in&#39;,&#39;is not in&#39;,&#39;ends with&#39;,&#39;does not end with&#39;,&#39;contains&#39;,&#39;does not contain&#39;]<br />&#160;&#160; });</div>
<p>However I&#39;m still not getting &#39;less&#39;, &#39;less or equal&#39;, &#39;greater&#39;, and &#39;greater or equal&#39; in the drop down.</p>
<p>Got to be missing something somewhere.</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">/blog/?page_id=393/help/missing-operators-from-search-list/&#38;value=odata&#38;type=1&#38;include=1&#38;search=1&#38;ret=all</div>
]]></description>
        	        	<pubDate>Tue, 30 Aug 2011 12:51:26 +0300</pubDate>
        </item>
        <item>
        	<title>4D on Missing Operators From Search List.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/missing-operators-from-search-list#p24426</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/missing-operators-from-search-list#p24426</guid>
        	        	<description><![CDATA[<p>Have now tried running it from jquery.jqGrid.src.js file.</p>
<p>No change. Something is stopping &#62; and &#60; operators from showing on the list.</p>
<p>Anyone got any thoughts?</p>
]]></description>
        	        	<pubDate>Fri, 26 Aug 2011 16:48:05 +0300</pubDate>
        </item>
        <item>
        	<title>4D on Missing Operators From Search List.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/missing-operators-from-search-list#p24406</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/missing-operators-from-search-list#p24406</guid>
        	        	<description><![CDATA[<p>Have now also found</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4870' value='Select Code' data-codeid='sfcode4870' /></p>
<div class='sfcode' id='sfcode4870'>description:&#34;does not contain&#34;,operator:&#34;NOT LIKE&#34;},{name:&#34;nu&#34;,description:&#34;is null&#34;,operator:&#34;IS NULL&#34;},{name:&#34;nn&#34;,description:&#34;is not null&#34;,operator:&#34;IS NOT NULL&#34;}],numopts:[&#34;eq&#34;,&#34;ne&#34;,&#34;lt&#34;,&#34;le&#34;,&#34;gt&#34;,&#34;ge&#34;,&#34;nu&#34;,&#34;nn&#34;,&#34;in&#34;,&#34;ni&#34;],stropts:[&#34;eq&#34;,&#34;ne&#34;,&#34;bw&#34;,&#34;bn&#34;,&#34;ew&#34;,&#34;en&#34;,&#34;cn&#34;,&#34;nc&#34;,&#34;nu&#34;,&#34;nn&#34;,&#34;in&#34;,&#34;ni&#34;],_gridsopt:[],groupOps:[&#34;AND&#34;,&#34;OR&#34;],operator:&#34;&#60;=&#34;},{name:&#34;gt&#34;,description:&#34;greater&#34;,operator:&#34;&#62;&#34;},{name:&#34;ge&#34;,description:&#34;greater or equal&#34;,operator:&#34;&#62;=&#34;},{name:&#34;bw&#34;,description:&#34;begins with&#34;,operator:&#34;LIKE&#34;},{name:&#34;bn&#34;,description:&#34;does not begin with&#34;,operator:&#34;NOT LIKE&#34;},{name:&#34;in&#34;,description:&#34;in&#34;,operator:&#34;IN&#34;},{name:&#34;ni&#34;,description:&#34;not in&#34;,operator:&#34;NOT IN&#34;},{name:&#34;ew&#34;,description:&#34;ends with&#34;,operator:&#34;LIKE&#34;},{name:&#34;en&#34;,description:&#34;does not end with&#34;,operator:&#34;NOT LIKE&#34;},{name:&#34;cn&#34;,description:&#34;contains&#34;,operator:&#34;LIKE&#34;},{name:&#34;nc&#34;,ops:[{name:&#34;eq&#34;,description:&#34;equal&#34;,operator:&#34;=&#34;},{name:&#34;ne&#34;,description:&#34;not equal&#34;,operator:&#34;&#60;&#62;&#34;},{name:&#34;lt&#34;,description:&#34;less&#34;,operator:&#34;&#60;&#34;},{name:&#34;le&#34;,description:&#34;less or equal&#34;,</div>
<p>in jquery.jqGrid.min.js, and changes to names here are also reflected.</p>
<p>Must have misconfigured something somewhere.</p>
]]></description>
        	        	<pubDate>Thu, 25 Aug 2011 16:13:34 +0300</pubDate>
        </item>
        <item>
        	<title>4D on Missing Operators From Search List.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/missing-operators-from-search-list#p24405</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/missing-operators-from-search-list#p24405</guid>
        	        	<description><![CDATA[<p>Looking a bit closer I have</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit7469' value='Select Code' data-codeid='sfcode7469' /></p>
<div class='sfcode' id='sfcode7469'>odata : [&#39;equal&#39;, &#39;not equal&#39;, &#39;less&#39;, &#39;less or equal&#39;,&#39;greater&#39;,&#39;greater or equal&#39;, &#39;begins with&#39;,&#39;does not begin with&#39;,&#39;is in&#39;,&#39;is not in&#39;,&#39;ends with&#39;,&#39;does not end with&#39;,&#39;contains&#39;,&#39;does not contain&#39;],</div>
<p>Which features Greater and Greater or Equal, however they are not present, yet changes here reflect in the search box.</p>
<p>Could be due to inconsistency in naming of the operators.</p>
]]></description>
        	        	<pubDate>Thu, 25 Aug 2011 15:55:18 +0300</pubDate>
        </item>
        <item>
        	<title>4D on Missing Operators From Search List.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/missing-operators-from-search-list#p24404</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/missing-operators-from-search-list#p24404</guid>
        	        	<description><![CDATA[<p>Found someting.</p>
</p>
<p>Looks like it&#39;s pulling the values from the Language file grid.locale.js</p>
</p>
<p>So should that be over-ruled by jquery.searchFilter.js, and if so why is it not?</p>
]]></description>
        	        	<pubDate>Thu, 25 Aug 2011 15:52:51 +0300</pubDate>
        </item>
        <item>
        	<title>4D on Missing Operators From Search List.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/missing-operators-from-search-list#p24399</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/missing-operators-from-search-list#p24399</guid>
        	        	<description><![CDATA[</p>
<p>I&#39;ve successfully implemented a grid, with a subgrid.<br />I&#39;ve also got the advanced search feature running, and it returns data successfully.<br />However I have noticed I am missing some of the operators in the list. There appears to be no Greater Then or Less Then.</p>
<p>[Image Can Not Be Found]</p>
<p>I have checked the file jquery.SearchFilter.js and the full list appears in there.</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit506' value='Select Code' data-codeid='sfcode506' /></p>
<div class='sfcode' id='sfcode506'>&#160;&#160;&#160; operators: [<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; { op: &#34;eq&#34;, text: &#34;is equal to&#34; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; { op: &#34;ne&#34;, text: &#34;is not equal to&#34; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; { op: &#34;lt&#34;, text: &#34;is less than&#34; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; { op: &#34;le&#34;, text: &#34;is less or equal to&#34; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; { op: &#34;gt&#34;, text: &#34;is greater than&#34; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; { op: &#34;ge&#34;, text: &#34;is greater or equal to&#34; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; { op: &#34;in&#34;, text: &#34;is in&#34; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; { op: &#34;ni&#34;, text: &#34;is not in&#34; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; { op: &#34;bw&#34;, text: &#34;begins with&#34; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; { op: &#34;bn&#34;, text: &#34;does not begin with&#34; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; { op: &#34;ew&#34;, text: &#34;ends with&#34; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; { op: &#34;en&#34;, text: &#34;does not end with&#34; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; { op: &#34;cn&#34;, text: &#34;contains&#34; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; { op: &#34;nc&#34;, text: &#34;does not contain&#34; }<br />&#160;&#160;&#160; ],</div>
<p>I have also tried adding a &#60;script&#62; link to the searchFilter file, with no change.</p>
<p>Grid script:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit7173' value='Select Code' data-codeid='sfcode7173' /></p>
<div class='sfcode' id='sfcode7173'>&#60;script type=&#34;text/javascript&#34;&#62;<br />$(function(){ <br />&#160; $(&#34;#list&#34;).jqGrid({<br />&#160;&#160;&#160; url:&#39;execCalls/rdsTDashLoad.php&#39;,<br />&#160;&#160;&#160; datatype: &#39;xml&#39;,<br />&#160;&#160;&#160; mtype: &#39;POST&#39;,<br />&#160;&#160;&#160; colNames:[&#39;ID&#39;, &#39;Resolver&#39;, &#39;HD No&#39;, &#39;Previous Work&#39;, &#39;Previous Contact&#39;, &#39;Request&#39;, &#39;Status&#39;, &#39;Application&#39;],<br />&#160;&#160;&#160; colModel :[ <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;did&#39;, index:&#39;did&#39;, width:30, align:&#34;center&#34;, editable:true, editoptions:{size:26}}, <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;username&#39;, index:&#39;username&#39;, width:90, align:&#34;center&#34;, sortable:true, editoptions:{size:26}}, <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;hdno&#39;, index:&#39;hdno&#39;, width:80, align:&#39;center&#39;, sortable:true, editable:true, editoptions:{size:26}}, <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;prevWork&#39;, index:&#39;prevWork&#39;, width:200, align:&#39;left&#39;, editable:true, edittype: &#34;textarea&#34;, editoptions:{rows:&#34;5&#34;,cols:&#34;25&#34;}}, <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;prevCon&#39;, index:&#39;prevCon&#39;, width:200, align:&#39;right&#39;, editable:true, editoptions:{size:26}, align:&#39;center&#39;}, <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;description&#39;, index:&#39;description&#39;, width:150, sortable:false, editable:true, edittype: &#34;textarea&#34;, editoptions:{rows:&#34;5&#34;,cols:&#34;25&#34;}},<br />&#160;&#160;&#160;&#160;&#160; {name:&#34;statDesc&#34;, index:&#34;statDesc&#34;, width:50, align:&#34;center&#34;, editable:false} ,<br />&#160;&#160; &#160;&#160; {name:&#34;appDesc&#34;, index:&#34;appDesc&#34;, width:80, align:&#34;center&#34;, editable:false}<br />&#160;&#160;&#160; ],<br />&#160;&#160;&#160; pager: &#39;#pager&#39;,<br />&#160;&#160;&#160; rowNum:10,<br />&#160;&#160;&#160; rowList:[10,20,30],<br />&#160;&#160;&#160; sortname: &#39;did&#39;,<br />&#160;&#160;&#160; sortorder: &#39;desc&#39;,<br />&#160;&#160;&#160; viewrecords: true,<br />&#160;&#160;&#160; gridview: true,<br />&#160;&#160;&#160; caption: &#39;Resolution Support Dashboard&#39;,<br />&#160;&#160; &#160;height:450,<br />&#160;&#160; &#160;ondblClickRow: function(rowid) {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$(this).jqGrid(&#39;editGridRow&#39;, rowid, {height:400, reloadAfterSubmit:false, closeAfterEdit:true, closeOnEscape:true, width: 400});<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;},<br />&#160;&#160; &#160;editurl:&#34;execCalls/rdsTdashEdit.php&#34;,<br />&#160;&#160; &#160;multiselect: true,<br />&#160;&#160; &#160;<br />&#160;&#160; &#160;//Begin Subgrid routine.<br />&#160;&#160; &#160;subGrid: true,<br />&#160;&#160; &#160;multiselect: true,<br />&#160;&#160; &#160;subGridRowExpanded: function(subgrid_id, row_id) {<br />&#160;&#160; &#160;&#160;&#160; &#160;// we pass two parameters<br />&#160;&#160; &#160;&#160;&#160; &#160;// subgrid_id is a id of the div tag created whitin a table data<br />&#160;&#160; &#160;&#160;&#160; &#160;// the id of this elemenet is a combination of the &#34;sg_&#34; + id of the row<br />&#160;&#160; &#160;&#160;&#160; &#160;// the row_id is the id of the row<br />&#160;&#160; &#160;&#160;&#160; &#160;// If we wan to pass additinal parameters to the url we can use<br />&#160;&#160; &#160;&#160;&#160; &#160;// a method getRowData(row_id) - which returns associative array in type name-value<br />&#160;&#160; &#160;&#160;&#160; &#160;// here we can easy construct the flowing<br />&#160;&#160; &#160;&#160;&#160; &#160;var subgrid_table_id, pager_id;<br />&#160;&#160; &#160;&#160;&#160; &#160;subgrid_table_id = subgrid_id+&#34;_t&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;pager_id = &#34;p_&#34;+subgrid_table_id;<br />&#160;&#160; &#160;&#160;&#160; &#160;$(&#34;#&#34;+subgrid_id).html(&#34;&#60;table id=&#39;&#34;+subgrid_table_id+&#34;&#39; class=&#39;scroll&#39;&#62;&#60;/table&#62;&#60;div id=&#39;&#34;+pager_id+&#34;&#39; class=&#39;scroll&#39;&#62;&#60;/div&#62;&#34;);<br />&#160;&#160; &#160;&#160;&#160; &#160;jQuery(&#34;#&#34;+subgrid_table_id).jqGrid({<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;url:&#34;execCalls/rdsTDashSub.php?q=2&#38;id=&#34;+row_id,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;datatype: &#34;xml&#34;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;colNames: [&#39;id&#39;,&#39;datID&#39;,&#39;Start&#39;,&#39;End&#39;,&#39;Comments&#39;,&#39;Status&#39;,&#39;Assigned To&#39;],<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;colModel: [<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#34;hid&#34;, index:&#34;hid&#34;, width:40, key:true, editable:true, hidden:false, editoptions:{size:26}},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#34;datid&#34;, index:&#34;datid&#34;, width:40, editable:true, hidden:false, editoptions:{size:26}},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#34;startDTTM&#34;, index:&#34;startDTTM&#34;, width:120, editable:true},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#34;endDTTM&#34;, index:&#34;endDTTM&#34;, width:120, editable:true},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#34;comments&#34;, index:&#34;comments&#34;, width:200, align:&#34;right&#34;, editable:true, edittype:&#34;textarea&#34;, editoptions:{rows:&#34;4&#34;,cols:&#34;25&#34;}},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#34;description&#34;, index:&#34;description&#34;, width:100, align:&#34;center&#34;, editable:true, edittype:&#34;select&#34;, editoptions:{value:&#34;1:Open;2:Closed;3:Assigned;4:Work in Progress;5:Deleted&#34;}},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#34;assignedto&#34;, index:&#34;assignedto&#34;, width:100, align:&#34;center&#34;, editable:true, edittype:&#34;select&#34;, editoptions:{value:&#34;6:DKELLY;235:DHALL;330:APhillips&#34;}}<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;],<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;editurl:&#34;execCalls/rdsTdashEditSub.php&#34;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;rowNum:20,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160; &#160;&#160;&#160; &#160;pager: pager_id,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160; &#160;&#160;&#160; &#160;sortname: &#39;startDTTM&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; sortorder: &#34;asc&#34;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; height: &#39;100%&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;//Double click edit<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;ondblClickRow: function(rowid) {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$(this).jqGrid(&#39;editGridRow&#39;, rowid, {height:340,reloadAfterSubmit:false,closeAfterEdit:true,closeOnEscape:true});<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;});<br />&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;//This line enables reload and search links on bottom of grid.<br />&#160;&#160; &#160;&#160;&#160; &#160;jQuery(&#34;#&#34;+subgrid_table_id).jqGrid(&#39;navGrid&#39;,&#34;#&#34;+pager_id,{edit:false,add:false,del:false})<br />&#160;&#160; &#160;},<br />&#160;&#160; &#160;subGridRowColapsed: function(subgrid_id, row_id) {<br />&#160;&#160; &#160;&#160;&#160; &#160;//this function is called before removing the data<br />&#160;&#160; &#160;&#160;&#160; &#160;var subgrid_table_id;<br />&#160;&#160; &#160;&#160;&#160; &#160;subgrid_table_id = subgrid_id+&#34;_t&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;jQuery(&#34;#&#34;+subgrid_table_id).remove();<br />&#160;&#160; &#160;}<br />});</p>
<p>//This line enables reload and search links on bottom of grid.<br />jQuery(&#34;#list&#34;).jqGrid(&#39;navGrid&#39;,&#34;#pager&#34;,{add:false,del:false,edit:false});<br />jQuery(&#34;#list&#34;).jqGrid(&#39;searchGrid&#39;,{multipleSearch:true, multipleGroup:true, showQuery:true});<br />//jQuery(&#34;#list&#34;).jqGrid(&#39;filterToolbar&#39;,{stringResult:true, searchOnEnter:true, multipleSearch:true});</p>
<p>});<br />&#60;/script&#62;</p>
</div>
<p>tdashload.php</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3940' value='Select Code' data-codeid='sfcode3940' /></p>
<div class='sfcode' id='sfcode3940'>&#60;?php <br />//include the information needed for the connection to MySQL data base server. <br />// we store here username, database and password <br />require_once(&#39;../../Connections/connMeridian.php&#39;);<br />&#160;<br />//Strip slashes<br />&#160;&#160; if (!function_exists(&#34;GetSQLValueString&#34;)) {<br />&#160;&#160;&#160; function GetSQLValueString($theValue, $theType, $theDefinedValue = &#34;&#34;, $theNotDefinedValue = &#34;&#34;) <br />&#160;&#160;&#160; {<br />&#160;&#160;&#160;&#160;&#160; if (PHP_VERSION &#60; 6) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;<br />&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160; &#160;<br />&#160;&#160;&#160;&#160;&#160; $theValue = function_exists(&#34;mysql_real_escape_string&#34;) ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);<br />&#160;&#160; &#160;<br />&#160;&#160;&#160;&#160;&#160; switch ($theType) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; case &#34;text&#34;:<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $theValue = ($theValue != &#34;&#34;) ? &#34;&#39;&#34; . $theValue . &#34;&#39;&#34; : &#34;NULL&#34;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; break;&#160;&#160; &#160;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; case &#34;long&#34;:<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; case &#34;int&#34;:<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $theValue = ($theValue != &#34;&#34;) ? intval($theValue) : &#34;NULL&#34;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; break;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; case &#34;double&#34;:<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $theValue = ($theValue != &#34;&#34;) ? doubleval($theValue) : &#34;NULL&#34;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; break;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; case &#34;date&#34;:<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $theValue = ($theValue != &#34;&#34;) ? &#34;&#39;&#34; . $theValue . &#34;&#39;&#34; : &#34;NULL&#34;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; break;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; case &#34;defined&#34;:<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $theValue = ($theValue != &#34;&#34;) ? $theDefinedValue : $theNotDefinedValue;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; break;<br />&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160; return $theValue;<br />&#160;&#160;&#160; }<br />&#160;&#160;&#160; } <br />&#160;<br />// to the url parameter are added 4 parameters as described in colModel<br />// we should get these parameters to construct the needed query<br />// Since we specify in the options of the grid that we will use a GET method <br />// we should use the appropriate command to obtain the parameters. <br />// In our case this is $_GET. If we specify that we want to use post <br />// we should use $_POST. Maybe the better way is to use $_REQUEST, which<br />// contain both the GET and POST variables. For more information refer to php documentation.<br />// Get the requested page. By default grid sets this to 1. <br />$page = $_POST[&#39;page&#39;]; <br />&#160;<br />// get how many rows we want to have into the grid - rowNum parameter in the grid <br />$limit = $_POST[&#39;rows&#39;]; <br />&#160;<br />// get index row - i.e. user click to sort. At first time sortname parameter -<br />// after that the index from colModel <br />$sidx = $_POST[&#39;sidx&#39;]; <br />&#160;<br />// sorting order - at first time sortorder <br />$sord = $_POST[&#39;sord&#39;]; </p>
<p>$today = date(&#39;Y-m-d&#39;, time());</p>
<p>// Begin routine to build WHERE clause from search string<br />$where = &#34;&#34;;<br />$searchOn = $_REQUEST[&#39;_search&#39;];<br />if($searchOn==&#39;true&#39;) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $searchstr = $_REQUEST[&#39;filters&#39;];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $where = constructWhere($searchstr);<br />}<br />function constructWhere($s){<br />&#160;&#160;&#160; $qwery = &#34;&#34;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; //[&#39;eq&#39;,&#39;ne&#39;,&#39;lt&#39;,&#39;le&#39;,&#39;gt&#39;,&#39;ge&#39;,&#39;bw&#39;,&#39;bn&#39;,&#39;in&#39;,&#39;ni&#39;,&#39;ew&#39;,&#39;en&#39;,&#39;cn&#39;,&#39;nc&#39;]<br />&#160;&#160;&#160; $qopers = array(<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;eq&#39;=&#62;&#34; = &#34;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;ne&#39;=&#62;&#34; &#60;&#62; &#34;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;lt&#39;=&#62;&#34; &#60; &#34;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;le&#39;=&#62;&#34; &#60;= &#34;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;gt&#39;=&#62;&#34; &#62; &#34;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;ge&#39;=&#62;&#34; &#62;= &#34;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;bw&#39;=&#62;&#34; LIKE &#34;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;bn&#39;=&#62;&#34; NOT LIKE &#34;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;in&#39;=&#62;&#34; IN &#34;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;ni&#39;=&#62;&#34; NOT IN &#34;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;ew&#39;=&#62;&#34; LIKE &#34;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;en&#39;=&#62;&#34; NOT LIKE &#34;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;cn&#39;=&#62;&#34; LIKE &#34; ,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;nc&#39;=&#62;&#34; NOT LIKE &#34;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; );<br />&#160;&#160;&#160; if ($s) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $jsona = json_decode($s,true);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(is_array($jsona)){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $gopr = $jsona[&#39;groupOp&#39;];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $rules = $jsona[&#39;rules&#39;];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $i =0;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; foreach($rules as $key=&#62;$val) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $field = $val[&#39;field&#39;];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $op = $val[&#39;op&#39;];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $v = $val[&#39;data&#39;];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if($v &#38;&#38; $op) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $i++;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // ToSql in this case is absolutley needed<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $v = ToSql($field,$op,$v);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if ($i == 1) {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; //$qwery changed from WHERE to HAVING to allow use of aliases.<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $qwery = &#34;HAVING &#34;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; } else {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $qwery .= &#34; &#34; .$gopr.&#34; &#34;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; switch ($op) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // in need other thing<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; case &#39;in&#39; :<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; case &#39;ni&#39; :<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $qwery .= $field.$qopers[$op].&#34; (&#34;.$v.&#34;)&#34;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; break;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; default:<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $qwery .= $field.$qopers[$op].$v;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160; }<br />&#160;&#160;&#160; return $qwery;<br />}<br />function ToSql ($field, $oper, $val) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; // we need here more advanced checking using the type of the field &#8211; i.e. integer, string, float<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; switch ($field) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; case &#39;id&#39;:<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return intval($val);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; break;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; case &#39;amount&#39;:<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; case &#39;tax&#39;:<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; case &#39;total&#39;:<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return floatval($val);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; break;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; default :<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //mysql_real_escape_string is better<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if($oper==&#39;bw&#39; &#124;&#124; $oper==&#39;bn&#39;) return &#34;&#39;&#34; . addslashes($val) . &#34;%&#39;&#34;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; else if ($oper==&#39;ew&#39; &#124;&#124; $oper==&#39;en&#39;) return &#34;&#39;%&#34; . addcslashes($val) . &#34;&#39;&#34;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; else if ($oper==&#39;cn&#39; &#124;&#124; $oper==&#39;nc&#39;) return &#34;&#39;%&#34; . addslashes($val) . &#34;%&#39;&#34;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; else return &#34;&#39;&#34; . addslashes($val) . &#34;&#39;&#34;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />}<br />//End search routine.</p>
<p>// if we not pass at first time index use the first column for the index or what you want<br />if(!$sidx) $sidx =1; <br />&#160;<br />// connect to the MySQL database server <br />$db = mysql_connect($hostname_connMeridian, $username_connMeridian, $password_connMeridian) or die(&#34;Connection Error &#34; . mysql_error()); </p>
<p>// select the database <br />mysql_select_db($database_connMeridian) or die(&#34;Error connecting to db&#34;); <br />&#160;<br />// calculate the number of rows for the query. We need this for paging the result <br />$result = mysql_query(&#34;SELECT COUNT(*) AS count FROM tbldata WHERE active = 1 AND tstampid &#62; &#39;&#34;.$today.&#34;&#39;;&#34;); <br />$row = mysql_fetch_array($result,MYSQL_ASSOC); <br />$count = $row[&#39;count&#39;]; <br />&#160;<br />// calculate the total pages for the query <br />if( $count &#62; 0 &#38;&#38; $limit &#62; 0) { <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $total_pages = ceil($count/$limit); <br />} else { <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $total_pages = 0; <br />} <br />&#160;<br />// if for some reasons the requested page is greater than the total <br />// set the requested page to total page <br />if ($page &#62; $total_pages) $page=$total_pages;<br />&#160;<br />// calculate the starting position of the rows <br />$start = $limit*$page - $limit;<br />&#160;<br />// if for some reasons start position is negative set it to 0 <br />// typical case is that the user type 0 for the requested page <br />if($start &#60;0) $start = 0; <br />&#160;<br />// the actual query for the grid data <br />$SQL = &#34;SELECT dat.id AS did, usr.username, dat.hdno, dat.prevWork, dat.prevCon, dat.description, stat.description AS statDesc, app.description AS appDesc FROM tbldata dat INNER JOIN tblusr usr ON dat.usrID = usr.id INNER JOIN tblstatus stat ON dat.status = stat.id INNER JOIN tblapp app ON dat.appgrp = app.id &#34;.$where.&#34; ORDER BY $sidx $sord LIMIT $start , $limit&#34;; <br />$result = mysql_query( $SQL ) or die(&#34;Could not execute query.&#34;.mysql_error()); <br />&#160;<br />// we should set the appropriate header information. Do not forget this.<br />header(&#34;Content-type: text/xml;charset=utf-8&#34;);<br />&#160;<br />$s = &#34;&#60;?xml version=&#39;1.0&#39; encoding=&#39;utf-8&#39;?&#62;&#34;;<br />$s .=&#160; &#34;&#60;rows&#62;&#34;;<br />$s .= &#34;&#60;page&#62;&#34;.$page.&#34;&#60;/page&#62;&#34;;<br />$s .= &#34;&#60;total&#62;&#34;.$total_pages.&#34;&#60;/total&#62;&#34;;<br />$s .= &#34;&#60;records&#62;&#34;.$count.&#34;&#60;/records&#62;&#34;;<br />&#160;<br />// be sure to put text data in CDATA<br />while($row = mysql_fetch_array($result,MYSQL_ASSOC)) {<br />&#160;&#160;&#160; $s .= &#34;&#60;row id=&#39;&#34;. $row[&#39;id&#39;].&#34;&#39;&#62;&#34;;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;<br />&#160;&#160;&#160; $s .= &#34;&#60;cell&#62;&#34;. $row[&#39;did&#39;].&#34;&#60;/cell&#62;&#34;;<br />&#160;&#160;&#160; $s .= &#34;&#60;cell&#62;&#34;. $row[&#39;username&#39;].&#34;&#60;/cell&#62;&#34;;<br />&#160;&#160;&#160; $s .= &#34;&#60;cell&#62;&#34;. $row[&#39;hdno&#39;].&#34;&#60;/cell&#62;&#34;;<br />&#160;&#160;&#160; $s .= &#34;&#60;cell&#62;&#60;![CDATA[&#34;. $row[&#39;prevWork&#39;].&#34;]]&#62;&#60;/cell&#62;&#34;;<br />&#160;&#160;&#160; $s .= &#34;&#60;cell&#62;&#60;![CDATA[&#34;. $row[&#39;prevCon&#39;].&#34;]]&#62;&#60;/cell&#62;&#34;;<br />&#160;&#160;&#160; $s .= &#34;&#60;cell&#62;&#60;![CDATA[&#34;. $row[&#39;description&#39;].&#34;]]&#62;&#60;/cell&#62;&#34;;<br />&#160;&#160; &#160;$s .= &#34;&#60;cell&#62;&#60;![CDATA[&#34;. $row[&#39;statDesc&#39;].&#34;]]&#62;&#60;/cell&#62;&#34;;<br />&#160;&#160; &#160;$s .= &#34;&#60;cell&#62;&#60;![CDATA[&#34;. $row[&#39;appDesc&#39;].&#34;]]&#62;&#60;/cell&#62;&#34;;<br />&#160;&#160;&#160; $s .= &#34;&#60;/row&#62;&#34;;<br />}<br />$s .= &#34;&#60;/rows&#62;&#34;; <br />&#160;<br />echo $s;<br />?&#62;</p>
</div>
<p>It&#39;s very much hacked together, and it works, it&#39;s just the missing operators.</p>
<p>Have I missed something?</p>
<p>Cheers.</p>
]]></description>
        	        	<pubDate>Wed, 24 Aug 2011 14:44:10 +0300</pubDate>
        </item>
</channel>
</rss>