CalcBuilder Forum

Generate a "next" number

User moon_637 2012-08-06 17:04:02

Is it possible to generate a sequential number field ie 1000,1001,1002

Moonsoft support 2012-08-07 09:10:31

Hello,
in order to get an automatic counter, you could use a database query at code section, for example counting the stats rows:


SELECT count(distinct idrequest) FROM #__calcbuilder_stats;

To execute a query you can check the joomla docs to find the right code and some examples:

http://docs.joomla.org/Accessing_the_database_using_JDatabase


Hope this helps,

...
List Manager

Build different lists for your site

Buy now!
...
Support/development

Perfect for small code changes or to correct any bug at your site

Buy now!