CalcBuilder Forum

Generate a "next" number

Usuario 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,

...
CalcBuilder

Create dynamic calculators

Buy now!
...
Support/development 10 hours

Get a bigger amount of hours for more complex tasks and get a 10% discount

Buy now!