• 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: I make a query to a field autoincrementable

I make a query to a field autoincrementable 12 years 6 months ago #19202

  • info7373
  • info7373's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hi:

I am making a registration form with the registration plugin. Additional need to do a query to a table where his id is autoincrement.

I created the following code and show it in a hidden field.

//<code>
$db = JFactory::getDbo();
$query = "SELECT MAX(id) FROM #__users";
$db->setQuery($query);
$result=$db->loadResult();
return $result+1;
//</code>

This works for me very well, but if I delete the last id this code I make it clear that, when it's actually one more because it is autoincrement.

As I can do to take the next id no matter which has been cleared?

I have to do to give me support ...?
First Ticket: 28/09/2012 15:43:36
The administrator has disabled public write access.

Re: I make a query to a field autoincrementable 12 years 6 months ago #19417

Hello,

If you want support from RSJoomla! staff you need to send a ticket and not use the forum.
Regards
Wilco Alsemgeest

Please note: my help is not official customer support. To receive your support, submit a ticket by clicking www.rsjoomla.com/my-support-tickets.html
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!