<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Account Code to be define as int]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7547&amp;type=atom" />
	<updated>2018-06-09T18:04:42Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=7547</id>
		<entry>
			<title type="html"><![CDATA[Re: Account Code to be define as int]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31830#p31830" />
			<content type="html"><![CDATA[<p>@poncho1234</p><p>Stack Over Flow <a href="http://php.net/manual/en/function.natsort.php">natsort()</a> solution worked like a charm. Thanks A Lot.</p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2018-06-09T18:04:42Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31830#p31830</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Account Code to be define as int]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31829#p31829" />
			<content type="html"><![CDATA[<p>May not solve your problem as used for ordering, but could help:-</p><p><a href="https://stackoverflow.com/questions/1625166/mysql-order-varchar-field-as-integer?utm_medium=organic&amp;utm_source=google_rich_qa&amp;utm_campaign=google_rich_qa">stack-overflow mysql order varchar field as integer </a> not sure how you could use this to select next, but maybe you can?</p><p>More here @ <a href="https://dba.stackexchange.com/questions/21156/sort-a-varchar-field-numerically-in-mysql?utm_medium=organic&amp;utm_source=google_rich_qa&amp;utm_campaign=google_rich_qa"> DBA SE </a> pad the front with zeros or use CAST</p><p>Another one <a href="https://www.copterlabs.com/natural-sorting-in-mysql/"> here </a> uses a different method to sort by length 1st... the article also mentions a php function <a href="http://php.net/manual/en/function.natsort.php">natsort() </a> which may be worth investigating</p>]]></content>
			<author>
				<name><![CDATA[poncho1234]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19944</uri>
			</author>
			<updated>2018-06-09T12:50:23Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31829#p31829</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Account Code to be define as int]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31824#p31824" />
			<content type="html"><![CDATA[<p>Thanks @Joe,</p><p>Yes I understand, but Actually I needed a customization to automatically pick the Next Available Account Code for the Given Account Type. It worked Fine till Code 2899 but when it reaches 28100 it is not picking the next value 28101 because the order sequence of Varchar says 28100 is smaller than 2899.</p><p>Converting it to INT&nbsp; is working fine but I fear it may cause anomalies. Any Ideas?</p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2018-06-09T07:45:00Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31824#p31824</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Account Code to be define as int]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31817#p31817" />
			<content type="html"><![CDATA[<p>Hello @boxygen</p><p>Yes it will. There are many tables where there are references to the account number, so please do not change this. Why do you want to change from varchar to int. The reason for using varchar is how the account numbers are sorted and there might be a wish in some countries to have them alphanumeric.<br />In most serious accounting systems this variable is varchar.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2018-06-08T22:32:15Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31817#p31817</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Account Code to be define as int]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31814#p31814" />
			<content type="html"><![CDATA[<p>In chart_master table if I change the data type of account_code field from Varchar to int, will it cause any anomaly in relationships with other tables?</p><p>I have kept all Account Codes as Integer</p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2018-06-08T18:30:44Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31814#p31814</id>
		</entry>
</feed>
