<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Sr.No Not coming Properly]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=5291</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=5291&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Sr.No Not coming Properly.]]></description>
		<lastBuildDate>Thu, 06 Nov 2014 07:13:08 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Sr.No Not coming Properly]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=21365#p21365</link>
			<description><![CDATA[<p>Even tried&nbsp; :&nbsp; _(&quot;Sr.No.&quot;)=&gt;array(&#039;align&#039;=&gt;&#039;center&#039;,&#039;ord&#039;=&gt;&#039;desc&#039;)</p>]]></description>
			<author><![CDATA[null@example.com (tester1)]]></author>
			<pubDate>Thu, 06 Nov 2014 07:13:08 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=21365#p21365</guid>
		</item>
		<item>
			<title><![CDATA[Sr.No Not coming Properly]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=21361#p21361</link>
			<description><![CDATA[<p>I want to show list of my product as below :</p><br /><p>&nbsp; &nbsp; Sr.No | Name | Type <br />&nbsp; &nbsp; --------------------<br />&nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp;|&nbsp; aa&nbsp; | 2<br />&nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp;|&nbsp; bb&nbsp; | 2<br />&nbsp; &nbsp; 3&nbsp; &nbsp; &nbsp;|&nbsp; cc&nbsp; | 3<br />&nbsp; &nbsp; 4&nbsp; &nbsp; &nbsp;|&nbsp; dd&nbsp; | 2<br />&nbsp; &nbsp; 5&nbsp; &nbsp; &nbsp;|&nbsp; cc&nbsp; | 4 </p><br /><p>**But its coming as&nbsp; below **</p><br /><p>&nbsp; &nbsp; Sr.No | Name | Type <br />&nbsp; &nbsp; --------------------<br />&nbsp; &nbsp; 3&nbsp; &nbsp; &nbsp;|&nbsp; aa&nbsp; | 2<br />&nbsp; &nbsp; 5&nbsp; &nbsp; &nbsp;|&nbsp; bb&nbsp; | 2<br />&nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp;|&nbsp; cc&nbsp; | 3<br />&nbsp; &nbsp; 4&nbsp; &nbsp; &nbsp;|&nbsp; dd&nbsp; | 2<br />&nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp;|&nbsp; cc&nbsp; | 4 </p><p>Its not that i want order by name , i just want normal sr.no as per entry .. means if i add any entry first then sr.no 1 , 2 , 3 and so on..</p><p>But when i add any new entry then its sr.no get changed but it should get last sr.no </p><p>Below is what i have tried : </p><div class="codebox"><pre><code>    SELECT (@cnt := @cnt + 1) AS rowNumber, orn.name, orn.type ,  u.* 
    FROM  ofr AS u 
    CROSS JOIN (SELECT @cnt := 0) AS dummy
    LEFT JOIN  or_name AS orn ON u.id=orn.id 
    GROUP BY u.id ORDER BY rowNumber AND u.add_datetime DESC</code></pre></div><p>Listing is call in below way :</p><div class="codebox"><pre><code>    $result =   get_details()
     
    $cols = array( 
            _(&quot;Sr.No.&quot;)=&gt;array(&#039;align&#039;=&gt;&#039;center&#039;),
            _(&quot;Name&quot;)=&gt;array(&#039;align&#039;=&gt;&#039;center&#039;),
            _(&quot;Type&quot;)=&gt;array(&#039;align&#039;=&gt;&#039;center&#039;)
           );
    
    $table =&amp; new_db_pager(&#039;tablename&#039;, $result, $cols, &#039;ofr&#039;,&#039;id&#039;,10); 
    
    $table-&gt;width = &quot;95%&quot;;
    
    display_db_pager($table);</code></pre></div><br /><p>**Database :**</p><p>&nbsp; &nbsp; id : bigint(20)&nbsp; &nbsp; &nbsp; &nbsp; UNSIGNED&nbsp; &nbsp; No &nbsp; &nbsp; None&nbsp; &nbsp; AUTO_INCREMENT</p>]]></description>
			<author><![CDATA[null@example.com (tester1)]]></author>
			<pubDate>Thu, 06 Nov 2014 07:02:05 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=21361#p21361</guid>
		</item>
	</channel>
</rss>
