I use several forms to let the users register for bus trips, and i would like to put a counter that shows how many people who have signed up for the different trips. Basically a script that shows the last inputs cf_id. Like "There are now (cf_id of latest entry) participants for next weeks trip"
I think this might be useful, but i don't have the know-abouts to make it a script that works in a module:
http://help.joomla.org/content/view/716/60/
Can anyone help?
I think this might be useful, but i don't have the know-abouts to make it a script that works in a module:
http://help.joomla.org/content/view/716/60/
[REVIEW] database->insertid
database->insertid
Returns the unique record number of the last record to be inserted into a database table.
Syntax
int insertid ( )
Examples
Example: This example creates a new, default record in the users table and returns the unique id allocated to that user.
// Returns unique id of new user record or false
// if the insert failed.
function newUser() {
global $database;
$sql = 'INSERT INTO #__users () VALUES()';
$database->setQuery( $sql );
if (!$database->query()) {
echo $database->stderr();
return false;
}
return $database->insertid();
}
Can anyone help?
This topic is locked and no more replies can be posted.