<?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: search function dont work?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/search-function-dont-work</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/search-function-dont-work/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>drlinux on search function dont work?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/search-function-dont-work#p1901</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/search-function-dont-work#p1901</guid>
        	        	<description><![CDATA[<p>Problem solved, many thanks</p>
<p>Ibrahim</p>
]]></description>
        	        	<pubDate>Sat, 06 Sep 2008 03:00:31 +0300</pubDate>
        </item>
        <item>
        	<title>tony on search function dont work?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/search-function-dont-work#p1886</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/search-function-dont-work#p1886</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>The rest of docs says:</p>
<p>When the find button is clicked, jqGrid adds three parameters to the url,</p>
<p>in <em>name=value</em> pairs:</p>
<ul>
<li> <em>sField</em>: the &#39;searchField&#39;, the value comes from the <em>index</em> in colModel </li>
<li> <em>sValue</em>: the &#39;searchString&#39;, the value is the entered value </li>
<li> <em>sOper</em>: the &#39;searchOper&#39;, the value is the type of search - see sopt array, below </li>
</ul>
]]></description>
        	        	<pubDate>Fri, 05 Sep 2008 06:35:36 +0300</pubDate>
        </item>
        <item>
        	<title>drlinux on search function dont work?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/search-function-dont-work#p1884</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/search-function-dont-work#p1884</guid>
        	        	<description><![CDATA[<p>I saw on documentation that:</p>
<p><strong>Description </strong> <br /> This method uses <strong>colModel</strong> names and <strong>url</strong> parameters from jqGrid <br /> <code> Calling:     jQuery("#grid_id").searchGrid( options ); </code></p>
<p>So, when I did that is it replaced url for search?</p>
<p>jQuery(document).ready(function(){ <br />function pickdates(id){ &#160;<br />&#160;&#160; &#160;jQuery("#"+id+"_tarih","#rowed3").datepicker({dateFormat:"yy-mm-dd"});} <br />var lastsel; <br />jQuery("#rowed3").jqGrid({ <br />&#160; &#160;&#160;&#160; &#160;url:&#39;get.php&#39;, <br />&#160;&#160; &#160;datatype: "json", <br />&#160; &#160;&#160;&#160; &#160;colNames:[&#39;Id&#39;,&#39;Havuz&#39;,&#39;Tarih&#39;, &#39;Giren&#39;, &#39;&#199;Ä±kan&#39;,&#39;Ortalama&#39;,&#39;A&#231;Ä±klama&#39;], <br />&#160; &#160;&#160;&#160; &#160;colModel:[ <br />&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;id&#39;,index:&#39;id&#39;, width:40, align:"center"}, <br />&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;havuz&#39;,index:&#39;havuz&#39;, width:90, align:"center", editable:true}, <br />&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;tarih&#39;,index:&#39;tarih&#39;, width:90, align:"center", editable:true, sorttype:"date"}, <br />&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;giren&#39;,index:&#39;giren&#39;, width:90, align:"center", editable:true}, <br />&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;cikan&#39;,index:&#39;cikan&#39;, width:90, align:"center", editable:true}, <br />&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;ortalama&#39;,index:&#39;ortalama&#39;, width:90, align:"center"},&#160;&#160; &#160;&#160;&#160; &#160; <br />&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;aciklama&#39;,index:&#39;aciklama&#39;, width:250, align:"center", editable:true},&#160;&#160; &#160;&#160;&#160; &#160; <br />&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;], <br />&#160; &#160;&#160;&#160; &#160;rowNum:50, <br />&#160; &#160;&#160;&#160; &#160;rowList:[50,100,150], <br />&#160; &#160;&#160;&#160; &#160;imgpath: &#39;themes/sand/images&#39;, <br />&#160; &#160;&#160;&#160; &#160;pager: jQuery(&#39;#prowed3&#39;), <br />&#160; &#160;&#160;&#160; &#160;sortname: &#39;id&#39;, <br />&#160;&#160;&#160; viewrecords: true, <br />&#160;&#160;&#160; sortorder: "desc", <br />&#160;&#160; &#160;height: 363, <br />&#160;&#160;&#160; width:800, <br />&#160;&#160; &#160;caption: "BalÄ±k Hareket Tablosu D&#252;zenleme" <br />}).navGrid(&#39;#prowed3&#39;, {}, //options &#160;<br />{editCaption: "KayÄ±t D&#252;zenle", bSubmit: "Kaydet", bCancel: "Vazge&#231;", processData: "Kaydediyor...", url:"duzenle.php", onInitializeForm: function(formid) { <br />&#160;<br />$("#tarih",formid).datepicker({dateFormat:"dd-mm-yy"}); <br />&#160;<br />}}, // edit options &#160;<br />{addCaption: "KayÄ±t Ekle", bSubmit: "Kaydet", bCancel: "Vazge&#231;", processData: "Kaydediyor...", url:"ekle.php", onInitializeForm: function(formid) { <br />&#160;<br />$("#tarih",formid).datepicker({dateFormat:"dd-mm-yy"}); <br />&#160;<br />}}, // add options &#160;<br />{delCaption: "KayÄ±t Sil", bSubmit: "Evet", bCancel: "HayÄ±r", processData: "Siliniyor...", url:"sil.php", &#160;<br />msg:"Se&#231;ili KaydÄ±n Silinmesini OnaylÄ±yor musunuz?"}, // del options &#160;<br />{sopt:[&#39;cn&#39;,&#39;bw&#39;,&#39;eq&#39;,&#39;ne&#39;,&#39;lt&#39;,&#39;gt&#39;,&#39;ew&#39;], url:"arama.php?q=2"} // search options &#160;<br />); &#160;<br />});</p></p>
]]></description>
        	        	<pubDate>Fri, 05 Sep 2008 05:46:07 +0300</pubDate>
        </item>
        <item>
        	<title>tony on search function dont work?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/search-function-dont-work#p1880</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/search-function-dont-work#p1880</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>maybe you should check your script - also try first without jqGrid - what is</p>
<p>the result? The reasons could be 1001.</p>
</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 04 Sep 2008 04:22:50 +0300</pubDate>
        </item>
        <item>
        	<title>drlinux on search function dont work?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/search-function-dont-work#p1876</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/search-function-dont-work#p1876</guid>
        	        	<description><![CDATA[<p>I cant get the results... Is there any problem with my json php file?</p>
<p>&#60;?php <br />include("ayar.php"); <br />// coment the above lines if php 5 <br />include("JSON.php"); <br />$json = new Services_JSON(); <br />// end comment <br />$examp = $_REQUEST["q"]; //query number <br />&#160;<br />$page = $_REQUEST[&#39;page&#39;]; // get the requested page <br />$limit = $_REQUEST[&#39;rows&#39;]; // get how many rows we want to have into the grid <br />$sidx = $_REQUEST[&#39;sidx&#39;]; // get index row - i.e. user click to sort <br />$sord = $_REQUEST[&#39;sord&#39;]; // get the direction <br />if(!$sidx) $sidx =1; <br />&#160;<br />// search options <br />// IMPORTANT NOTE!!!!!!!!!!!!!!!!!!!!!!!!!!!! <br />// this type of constructing is not recommendet <br />// it is only for demonstration <br />//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! <br />$wh = ""; <br />$searchOn = Strip($_REQUEST[&#39;_search&#39;]); <br />if($searchOn==&#39;true&#39;) { <br />&#160;&#160;&#160; $fld = Strip($_REQUEST[&#39;searchField&#39;]); <br />&#160;&#160;&#160; if( $fld==&#39;id&#39; &#124;&#124; $fld ==&#39;tarih&#39; &#124;&#124; $fld==&#39;havuz&#39; &#124;&#124; $fld==&#39;giren&#39; &#124;&#124; $fld==&#39;cikan&#39; &#124;&#124; $fld==&#39;ortalama&#39; &#124;&#124; $fld==&#39;aciklama&#39; ) { <br />&#160;&#160;&#160; &#160;&#160;&#160; $fldata = Strip($_REQUEST[&#39;searchString&#39;]); <br />&#160;&#160;&#160; &#160;&#160;&#160; $foper = Strip($_REQUEST[&#39;searchOper&#39;]); <br />&#160;&#160;&#160; &#160;&#160;&#160; // costruct where <br />&#160;&#160;&#160; &#160;&#160;&#160; $wh .= " AND ".$fld; <br />&#160;&#160;&#160; &#160;&#160;&#160; switch ($foper) { <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; case "bw": <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $fldata .= "%"; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $wh .= " LIKE &#39;".$fldata."&#39;"; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; break; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; case "eq": <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if(is_numeric($fldata)) { <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $wh .= " = ".$fldata; <br />&#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; $wh .= " = &#39;".$fldata."&#39;"; <br />&#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; break; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; case "ne": <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if(is_numeric($fldata)) { <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $wh .= " &#60;&#62; ".$fldata; <br />&#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; $wh .= " &#60;&#62; &#39;".$fldata."&#39;"; <br />&#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; break; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; case "lt": <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if(is_numeric($fldata)) { <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $wh .= " &#60; ".$fldata; <br />&#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; $wh .= " &#60; &#39;".$fldata."&#39;"; <br />&#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; break; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; case "le": <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if(is_numeric($fldata)) { <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $wh .= " &#60;= ".$fldata; <br />&#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; $wh .= " &#60;= &#39;".$fldata."&#39;"; <br />&#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; break; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; case "gt": <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if(is_numeric($fldata)) { <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $wh .= " &#62; ".$fldata; <br />&#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; $wh .= " &#62; &#39;".$fldata."&#39;"; <br />&#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; break; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; case "ge": <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if(is_numeric($fldata)) { <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $wh .= " &#62;= ".$fldata; <br />&#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; $wh .= " &#62;= &#39;".$fldata."&#39;"; <br />&#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; break; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; case "ew": <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $wh .= " LIKE &#39;%".$fldata."&#39;"; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; break; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; case "ew": <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $wh .= " LIKE &#39;%".$fldata."%&#39;"; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; break; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; default : <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $wh = ""; <br />&#160;&#160;&#160; &#160;&#160;&#160; } <br />&#160;&#160;&#160; } <br />} <br />//echo $fld." : ".$wh; <br />// connect to the database <br />$db = mysql_connect($dbhost, $dbuser, $dbpassword) <br />or die("Connection Error: " . mysql_error()); <br />&#160;<br />mysql_select_db($database) or die("Error conecting to db."); <br />&#160;<br />switch ($examp) { <br />&#160;&#160;&#160; case 1: <br />&#160;&#160;&#160; &#160;&#160;&#160; $result = mysql_query("SELECT COUNT(*) AS count, SUM(giren) AS giren, SUM(cikan) AS cikan, SUM(ortalama) AS ortalama FROM balik_hareket".$wh); <br />&#160;&#160;&#160; &#160;&#160;&#160; $row = mysql_fetch_array($result,MYSQL_ASSOC); <br />&#160;&#160;&#160; &#160;&#160;&#160; $count = $row[&#39;count&#39;]; <br />&#160;&#160;&#160; &#160;&#160;&#160; if( $count &#62;0 ) { <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $total_pages = ceil($count/$limit); <br />&#160;&#160;&#160; &#160;&#160;&#160; } else { <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $total_pages = 0; <br />&#160;&#160;&#160; &#160;&#160;&#160; } <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if ($page &#62; $total_pages) $page=$total_pages; <br />&#160;&#160;&#160; &#160;&#160;&#160; $start = $limit*$page - $limit; // do not put $limit*($page - 1) <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if ($start&#60;0) $start = 0; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $SQL = "SELECT * FROM balik_hareket".$wh." ORDER BY ".$sidx." ". $sord." LIMIT ".$start." , ".$limit; <br />&#160;&#160;&#160; &#160;&#160;&#160; $result = mysql_query( $SQL ) or die("Couldnt execute query.".mysql_error()); <br />&#160;&#160;&#160; &#160;&#160;&#160; $responce-&#62;page = $page; <br />&#160;&#160;&#160; &#160;&#160;&#160; $responce-&#62;total = $total_pages; <br />&#160;&#160;&#160; &#160;&#160;&#160; $responce-&#62;records = $count; <br />$i=0; <br />while($row = mysql_fetch_array($result,MYSQL_ASSOC)) { <br />&#160;&#160;&#160; $responce-&#62;rows[$i][&#39;id&#39;]=$row[id]; <br />&#160;&#160;&#160; $responce-&#62;rows[$i][&#39;cell&#39;]=array($row[id],$row[havuz],$row[tarih],$row[giren],$row[cikan],$row[ortalama],$row[aciklama]); <br />&#160;&#160;&#160; $i++; <br />}&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />echo json_encode($responce); <br />&#160;&#160;&#160; &#160;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; break; <br />&#160;&#160;&#160; case 2: <br />&#160;&#160;&#160; &#160;&#160;&#160; $result = mysql_query("SELECT COUNT(*) AS count FROM balik_hareket".$wh); <br />&#160;&#160;&#160; &#160;&#160;&#160; $row = mysql_fetch_array($result,MYSQL_ASSOC); <br />&#160;&#160;&#160; &#160;&#160;&#160; $count = $row[&#39;count&#39;]; <br />&#160;<br />&#160;&#160;&#160; &#160;&#160;&#160; if( $count &#62;0 ) { <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $total_pages = ceil($count/$limit); <br />&#160;&#160;&#160; &#160;&#160;&#160; } else { <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $total_pages = 0; <br />&#160;&#160;&#160; &#160;&#160;&#160; } <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if ($page &#62; $total_pages) $page=$total_pages; <br />&#160;&#160;&#160; &#160;&#160;&#160; $start = $limit*$page - $limit; // do not put $limit*($page - 1) <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if ($start&#60;0) $start = 0; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $SQL = "SELECT * FROM balik_hareket".$wh." ORDER BY ".$sidx." ".$sord. " LIMIT ".$start." , ".$limit; <br />&#160;&#160;&#160; &#160;&#160;&#160; $result = mysql_query( $SQL ) or die("Could not execute query.".mysql_error()); <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $responce-&#62;page = $page; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $responce-&#62;total = $total_pages; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $responce-&#62;records = $count; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $i=0; <br />&#160;&#160;&#160; &#160;&#160;&#160; while($row = mysql_fetch_array($result,MYSQL_ASSOC)) { <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $responce-&#62;rows[$i][&#39;id&#39;]=$row[id]; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $responce-&#62;rows[$i][&#39;cell&#39;]=array($row[id],$row[tarih],$row[havuz],$row[giren],$row[cikan],$row[ortalama],$row[aciklama]); <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $i++; <br />&#160;&#160;&#160; &#160;&#160;&#160; }&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; //echo $json-&#62;encode($responce); // coment if php 5 <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; echo json_encode($responce); <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; break; <br />&#160;&#160;&#160; case 3: <br />&#160;&#160;&#160; &#160;&#160;&#160; $result = mysql_query("SELECT COUNT(*) AS count FROM balik_hareket".$wh); <br />&#160;&#160;&#160; &#160;&#160;&#160; $row = mysql_fetch_array($result,MYSQL_ASSOC); <br />&#160;&#160;&#160; &#160;&#160;&#160; $count = $row[&#39;count&#39;]; <br />&#160;<br />&#160;&#160;&#160; &#160;&#160;&#160; if( $count &#62;0 ) { <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $total_pages = ceil($count/$limit); <br />&#160;&#160;&#160; &#160;&#160;&#160; } else { <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $total_pages = 0; <br />&#160;&#160;&#160; &#160;&#160;&#160; } <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if ($page &#62; $total_pages) $page=$total_pages; <br />&#160;&#160;&#160; &#160;&#160;&#160; $start = $limit*$page - $limit; // do not put $limit*($page - 1) <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if ($start&#60;0) $start = 0; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $SQL = "SELECT * FROM balik_hareket".$wh." ORDER BY ".$sidx." ".$sord. " LIMIT ".$start." , ".$limit; <br />&#160;&#160;&#160; &#160;&#160;&#160; $result = mysql_query( $SQL ) or die("Couldnt execute query.".mysql_error()); <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $responce-&#62;page = $page; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $responce-&#62;total = $total_pages; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $responce-&#62;records = $count; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $i=0; <br />&#160;&#160;&#160; &#160;&#160;&#160; while($row = mysql_fetch_array($result,MYSQL_ASSOC)) { <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $responce-&#62;rows[$i][&#39;id&#39;]=$row[id]; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $responce-&#62;rows[$i][&#39;cell&#39;]=array("",$row[id],$row[tarih],$row[havuz],$row[giren],$row[cikan],$row[ortalama],$row[aciklama]); <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $i++; <br />&#160;&#160;&#160; &#160;&#160;&#160; }&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; echo $json-&#62;encode($responce); // coment if php 5 <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; //echo json_encode($responce); <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; break; <br />&#160;&#160;&#160; case 4: <br />&#160;&#160;&#160; &#160;&#160;&#160; $result = mysql_query("SELECT COUNT(*) AS count FROM balik_hareket".$wh); <br />&#160;&#160;&#160; &#160;&#160;&#160; $row = mysql_fetch_array($result,MYSQL_ASSOC); <br />&#160;&#160;&#160; &#160;&#160;&#160; $count = $row[&#39;count&#39;]; <br />&#160;&#160;&#160; &#160;&#160;&#160; if( $count &#62;0 ) { <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $total_pages = ceil($count/$limit); <br />&#160;&#160;&#160; &#160;&#160;&#160; } else { <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $total_pages = 0; <br />&#160;&#160;&#160; &#160;&#160;&#160; } <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if ($page &#62; $total_pages) $page=$total_pages; <br />&#160;&#160;&#160; &#160;&#160;&#160; $start = $limit*$page - $limit; // do not put $limit*($page - 1) <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if ($start&#60;0) $start = 0; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $SQL = "SELECT * FROM balik_hareket".$wh." ORDER BY ".$sidx." ".$sord. " LIMIT ".$start." , ".$limit; <br />&#160;&#160;&#160; &#160;&#160;&#160; $result = mysql_query( $SQL ) or die("Couldnt execute query.".mysql_error()); <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $responce-&#62;page = $page; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $responce-&#62;total = $total_pages; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $responce-&#62;records = $count; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $i=0; <br />&#160;&#160;&#160; &#160;&#160;&#160; while($row = mysql_fetch_array($result,MYSQL_ASSOC)) { <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $responce-&#62;rows[$i]=$row; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $i++; <br />&#160;&#160;&#160; &#160;&#160;&#160; }&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; //echo $json-&#62;encode($responce); // coment if php 5 <br />&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; echo json_encode($responce); <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; break; <br />&#160;&#160;&#160; case 5: <br />&#160;&#160;&#160; &#160;&#160;&#160; $result = mysql_query("SELECT COUNT(*) AS count FROM balik_hareket".$wh); <br />&#160;&#160;&#160; &#160;&#160;&#160; $row = mysql_fetch_array($result,MYSQL_ASSOC); <br />&#160;&#160;&#160; &#160;&#160;&#160; $count = $row[&#39;count&#39;]; <br />&#160;<br />&#160;&#160;&#160; &#160;&#160;&#160; if( $count &#62;0 ) { <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $total_pages = ceil($count/$limit); <br />&#160;&#160;&#160; &#160;&#160;&#160; } else { <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $total_pages = 0; <br />&#160;&#160;&#160; &#160;&#160;&#160; } <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if ($page &#62; $total_pages) $page=$total_pages; <br />&#160;&#160;&#160; &#160;&#160;&#160; $start = $limit*$page - $limit; // do not put $limit*($page - 1) <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if ($start&#60;0) $start = 0; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $SQL = "SELECT * FROM balik_hareket".$wh." ORDER BY ".$sidx." ".$sord. " LIMIT ".$start." , ".$limit; <br />&#160;&#160;&#160; &#160;&#160;&#160; $result = mysql_query( $SQL ) or die("Couldt execute query.".mysql_error()); <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $responce-&#62;page = $page; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $responce-&#62;total = $total_pages; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $responce-&#62;records = $count; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $i=0; <br />&#160;&#160;&#160; &#160;&#160;&#160; while($row = mysql_fetch_array($result,MYSQL_ASSOC)) { <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $responce-&#62;rows[$i]=$responce-&#62;rows[$i][&#39;cell&#39;]=array($row[id],$row[tarih],$row[havuz],$row[giren],$row[cikan],$row[ortalama],$row[aciklama]); <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $i++; <br />&#160;&#160;&#160; &#160;&#160;&#160; }&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; //echo $json-&#62;encode($responce); // coment if php 5 <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; echo json_encode($responce); <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; break; <br />&#160;<br />} <br />mysql_close($db); <br />&#160;<br />function Strip($value) <br />{ <br />&#160;&#160;&#160; if(get_magic_quotes_gpc() != 0) <br />&#160; &#160;&#160;&#160; { <br />&#160;&#160;&#160; &#160;&#160;&#160; if(is_array($value))&#160;&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if ( array_is_associative($value) ) <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; { <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; foreach( $value as $k=&#62;$v) <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $tmp_val[$k] = stripslashes($v); <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $value = $tmp_val;&#160; <br />&#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; else&#160;&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; for($j = 0; $j &#60; sizeof($value); $j++) <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $value[$j] = stripslashes($value[$j]); <br />&#160;&#160;&#160; &#160;&#160;&#160; else <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $value = stripslashes($value); <br />&#160;&#160;&#160; } <br />&#160;&#160;&#160; return $value; <br />} <br />function array_is_associative ($array) <br />{ <br />&#160;&#160;&#160; if ( is_array($array) &#38;&#38; ! empty($array) ) <br />&#160;&#160;&#160; { <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; for ( $iterator = count($array) - 1; $iterator; $iterator-- ) <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; { <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if ( ! array_key_exists($iterator, $array) ) { return true; } <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; } <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; return ! array_key_exists(0, $array); <br />&#160;&#160;&#160; } <br />&#160;&#160;&#160; return false; <br />} <br />&#160;<br />&#160;<br />?&#62; </p>
]]></description>
        	        	<pubDate>Thu, 04 Sep 2008 01:59:42 +0300</pubDate>
        </item>
</channel>
</rss>