<?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: Could anyone point out what I am doing out here?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/could-anyone-point-out-what-i-am-doing-out-here</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/could-anyone-point-out-what-i-am-doing-out-here/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Could anyone point out what I am doing out here?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/could-anyone-point-out-what-i-am-doing-out-here#p6987</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/could-anyone-point-out-what-i-am-doing-out-here#p6987</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>So my question is: What is the problem? Can you see the response from the server (using FireBug) If you can not see the response then this is not a jqGrid problem at all.</p>
</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sun, 31 May 2009 11:29:54 +0300</pubDate>
        </item>
        <item>
        	<title>perpetual_dream on Could anyone point out what I am doing out here?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/could-anyone-point-out-what-i-am-doing-out-here#p6975</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/could-anyone-point-out-what-i-am-doing-out-here#p6975</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>It wasn&#39;t until yesterday that I have found this great Jquery plugin yet I can&#39;t get it running.</p>
<p>I have two pages: display_articleshtml.php (which contains the html code) and (display_articles2.php) which contains the php (database related code).</p>
<p>First, until now I have a problem understanding the parameters that are passed to the server(.php pages). Where do the page&#39;, &#39;sidx&#39;, &#39;sort&#39;,&#39;row&#39; URL variables get passed?</p>
<p>After finally managing to return a valid xml document from<a href="http://tinyurl.com/mpd3c9" target="_blank"> display_articles2.php</a>, still nothing is being displayed at <a href="http://tinyurl.com/knclsc" target="_blank">display_articleshtml.php&#160; </a></p>
<p>Could anyone kindly point out what I am doing wrong&#8230;.</p>
<p>Here is my PHP (server side code)- display_articles2.php:</p>
<p>&#60;?php<br />//this block is for paging/sorting and displaying the results<br />require_once (&#39;../includes/config.inc.php&#39;);<br />$lang=return_lang();<br />require_once(BASE_URI.&#39;languages/&#39;.$lang.&#39;.php&#39;);&#160; <br />?&#62;<br />&#60;? // Determine how many pages there are&#8230;<br />// get the requested page </p>
<p>if (isset($_REQUEST[&#39;page&#39;])) {<br />$page = $_REQUEST[&#39;page&#39;];<br />} else {<br />$page=&#39;1&#39;; <br />}<br />// get how many rows we want to have into the grid<br />// rowNum parameter in the grid<br />if (isset($_REQUEST[&#39;row&#39;])) {<br />$limit = $_REQUEST[&#39;row&#39;];<br />} else {<br />$limit=&#39;10&#39;; <br />}</p>
<p>if (isset($_REQUEST[&#39;sidx&#39;])) {<br />$sidx = $_REQUEST[&#39;sidx&#39;];<br />} else {<br />$sidx=&#39;1&#39;; <br />}</p>
<p>if (isset($_REQUEST[&#39;sort&#39;])) {<br />$sord = $_REQUEST[&#39;sort&#39;];<br />} else {<br />$sord=&#39;ASC&#39;; <br />}</p>
<p>// get index row - i.e. user click to sort<br />// at first time sortname parameter - after that the index from colModel</p>
<p>// if we not pass at first time index use the first column for the index<br />if(!$sidx) $sidx =1;</p>
<p>&#160;&#160;&#160; $q2 = &#8220;SELECT COUNT(article_id) FROM articles&#8221;;<br />&#160;&#160;&#160; $r2 = mysql_query($q2,$dbc);</p>
<p>&#160;&#160;&#160; $row = mysql_fetch_array($r2);<br />&#160;&#160;&#160; $count = $row[0];</p>
<p>//calculation of total pages for the query<br />if( $count &#62;0 ) {<br />&#160;&#160;&#160; $total_pages = ceil($count/$limit);<br />} else {<br />&#160;&#160;&#160; $total_pages = 0;<br />}</p>
<p>// 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;</p>
<p>// calculate the starting position of the rows<br />$start = $limit*$page - $limit; // do not put $limit*($page - 1)<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 />// Determine the sorting order:<br />// Make the query:<br />$q = &#8220;SELECT articles.article_id, articles_categories.name as category_name, DATE_FORMAT(articles.date_added, &#39;%d %M, %Y&#39;) AS date_added, articles.title, articles.description, articles.privacy,articles.sticky FROM articles INNER JOIN articles_categories ON articles.category_id=articles_categories.category_id&#160;&#160; ORDER BY $sidx $sord LIMIT $start , $limit&#8221;;<br />$r = mysql_query($q,$dbc); // Run the query.<br />// Table header:<br />if ( stristr($_SERVER["HTTP_ACCEPT"],&#8221;application/xhtml+xml&#8221;) ) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; header(&#8221;Content-type: application/xhtml+xml;charset=utf-8&#8243;); <br />} else {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; header(&#8221;Content-type: text/xml;charset=utf-8&#8243;);<br />}<br />echo &#8220;&#60;?xml version=&#39;1.0&#39; encoding=&#39;utf-8&#39;?&#62;&#8221;;<br />echo &#8220;&#60;rows&#62;&#8221;;<br />echo &#8220;&#60;page&#62;&#8221;.$page.&#8221;&#60;/page&#62;&#8221;;<br />echo &#8220;&#60;total&#62;&#8221;.$total_pages.&#8221;&#60;/total&#62;&#8221;;<br />echo &#8220;&#60;records&#62;&#8221;.$count.&#8221;&#60;/records&#62;&#8221;;<br />while ($row = mysql_fetch_array($r, MYSQL_ASSOC)) {<br />if ($row[&#39;sticky&#39;]==YES) {<br />$stickyimage=&#8221;thumb_up.gif&#8221;;<br />} else {<br />$stickyimage=&#8221;thumb_down.gif&#8221;;<br />}</p>
<p>if ($row[&#39;privacy&#39;]==EVERYBODY) {<br />$privacyimage=&#8221;public-icon.png&#8221;;<br />} elseif ($row[&#39;privacy&#39;]==REGISTERED) {<br />$privacyimage=&#8221;user-icon.png&#8221;;<br />} else {<br />$privacyimage=&#8221;private-icon.png&#8221;;<br />}</p>
<p>echo &#8220;&#60;row id=&#39;&#8221;. $row[&#39;article_id&#39;] .&#8221;&#39;&#62;&#8221;;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; echo &#8220;&#60;cell&#62;&#8221;. $row[&#39;category_name&#39;].&#8221;&#60;/cell&#62;&#8221;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //echo &#8220;&#60;cell&#62;&#8221;. $row[&#39;article_id&#39;] .&#8221;&#60;/cell&#62;&#8221;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; echo &#8220;&#60;cell&#62;&#8221;. &#39;&#60;img width=&#8221;16&#8243; height=&#8221;16&#8243; border=&#8221;0&#8243; src=&#8221;../images/icon_delete.gif&#8221;/&#62;&#39;.&#8221;&#60;/cell&#62;&#8221;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; echo &#8220;&#60;cell&#62;&#8221;. &#39;&#60;img width=&#8221;16&#8243; height=&#8221;16&#8243; border=&#8221;0&#8243; src=&#8221;../images/icon_delete.gif&#8221;/&#62;&#39;.&#8221;&#60;/cell&#62;&#8221;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; echo &#8220;&#60;cell&#62;&#8221;. &#39;&#60;img border=&#8221;0&#8243; src=&#8221;../images/&#39;.$stickyimage.&#39;&#8221;/&#62;&#39;.&#8221;&#60;/cell&#62;&#8221;;<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; echo &#8220;&#60;cell&#62;&#8221;. &#39;&#60;img border=&#8221;0&#8243; src=&#8221;../images/&#39;.$privacyimage.&#39;&#8221;/&#62;&#39;.&#8221;&#60;/cell&#62;&#8221;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; echo &#8220;&#60;cell&#62;&#8221;. formatdate($row[&#39;date_added&#39;]).&#8221;&#60;/cell&#62;&#8221;;<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; echo &#8220;&#60;cell&#62;&#8221;. $row[&#39;title&#39;].&#8221;&#60;/cell&#62;&#8221;;<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; echo &#8220;&#60;/row&#62;&#8221;;<br />}<br />echo &#8220;&#60;/rows&#62;&#8221;; </p>
<p>&#160;&#160;&#160; </p>
<p>?&#62;</p>
</p>
<p>Thanks</p></p>
]]></description>
        	        	<pubDate>Sat, 30 May 2009 12:13:53 +0300</pubDate>
        </item>
</channel>
</rss>