<?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: how to get errors messages from mysql en xml?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-get-errors-messages-from-mysql-en-xml</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/how-to-get-errors-messages-from-mysql-en-xml/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>sebastiancb on how to get errors messages from mysql en xml?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-get-errors-messages-from-mysql-en-xml#p27345</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-get-errors-messages-from-mysql-en-xml#p27345</guid>
        	        	<description><![CDATA[<p>Hello, what I need to show errors from mysql but in xml, because I am loading data with this format, like this:</p>
<p>jQuery("#list1").jqGrid({</p>
<p>url:&#39;server.php?q=1&#39;, 	datatype: <strong>"xml"</strong>,</p>
<p>colNames:[&#39;Inv No&#39;,&#39;Date&#39;, &#39;Client&#39;, &#39;Amount&#39;,&#39;Tax&#39;,&#39;Total&#39;,&#39;Notes&#39;],</p>
<p>&#160; &#160; &#160; &#160; &#160; &#160; &#160; colModel:[    		{name:&#39;id&#39;,index:&#39;id&#39;, width:75},</p>
<p>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;{name:&#39;invdate&#39;,index:&#39;invdate&#39;, width:90},</p>
<p>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; {name:&#39;name&#39;,index:&#39;name&#39;, width:100},</p>
<p>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; {name:&#39;amount&#39;,index:&#39;amount&#39;, width:80, align:"right"},</p>
<p>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; {name:&#39;tax&#39;,ndex:&#39;tax&#39;, width:80, align:"right"},</p>
<p>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;{name:&#39;total&#39;,index:&#39;total&#39;, width:80,align:"right"},</p>
<p>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; {name:&#39;note&#39;,index:&#39;note&#39;, width:150, sortable:false}		    	],</p>
<p>rowNum:10,    	autowidth:</p>
<p>true,    	rowList:[10,20,30],pager: jQuery(&#39;#pager1&#39;),    	sortname: &#39;id&#39;,     viewrecords: true,     sortorder: "desc",     caption:"XML Example" }).</p>
<p>I have done this with JSON like this:</p>
<p>var json;</p>
<p>var editMessage = function(response,postdata){</p>
<p>&#160;json &#160; = response.responseText; // response text is returned from server.</p>
<p>var result = JSON.parse(json); // convert json object into javascript object</p>
<p>return [result.status,result.message,null];</p>
<p>}</p>
</p>
<p>jQuery.jgrid.edit = {</p>
<p>afterSubmit:editMessagemsg:{required:"El campo es obligatorio"},processData: "Processing...",reloadAfterSubmit:true,closeAfterEdit:true,bCancel: "Cerrar",bSubmit: "Guardar",editCaption: "Editar",</p>
<p>};</p>
<p>in the PHP file this to show the errors from mysql</p>
<p>$message="duplicated row";</p>
<p>$output[&#39;status&#39;] &#160;= false;</p>
<p>$output[&#39;message&#39;] = $message;</p>
<p>echo json_encode($output);</p>
<p>I need this but en XML</p>
</p>
<p>If someone needs the source code this is my e-mail: <a href="mailto:alxx28@hotmail.com" target="_blank">alxx28@hotmail.com</a></p></p>
]]></description>
        	        	<pubDate>Mon, 17 Sep 2012 19:58:31 +0300</pubDate>
        </item>
</channel>
</rss>