• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: diffrent incremental numbers for differnet forms

diffrent incremental numbers for differnet forms 13 years 3 months ago #15959

  • liam3
  • liam3's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 10
i am using the below code in a form to get the item id to use as a record number.
what i want to do is use a code that increments in sequence for each form.
eg
form a submissions 1,2,3,4,5,6,7 (last years form)
form a submission 1,2,3,4,5,6,7 (this years form)
atm i am doing a duplicated form for each year) and displays suffixed /2011 and /2012

i suffix the data on entry with the year suffix
what im trying to do is restart the numeric sequence each year, even if this years goes yyID (1201,1202,1203)
Suggestions or work around please
//<code>
$db=JFactory::getDBO();
$db->setQuery("SELECT COUNT(`SubmissionId`) cnt FROM #__rsform_submissions");
$db->query();
$result=$db->loadResult();
return intval($result)+1;
//</code>
Last Edit: 13 years 3 months ago by liam3. Reason: spelling
The administrator has disabled public write access.

Re: diffrent incremental numbers for differnet forms 12 years 6 months ago #19355

  • liam3
  • liam3's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 10
a refresher for this question
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!