Typically, one could use:
$conn = new mysqli($servername, $username, $password, $dbname);
and then later on:
$last_id = $conn->insert_id;
to get the id of last inserted record.
But how to do that with chronoforms, and then use it at next database-insert event?
I quess I could use custom code and write that $last_id = $conn->insert_id, but what to use instead conn, and would it work or is there some DB insert bu chronoforms itself in between?
Also, if I was to use such custom code, how then to get that $last_id to be used with next database save-method?
Thanks in advance!
$conn = new mysqli($servername, $username, $password, $dbname);
and then later on:
$last_id = $conn->insert_id;
to get the id of last inserted record.
But how to do that with chronoforms, and then use it at next database-insert event?
I quess I could use custom code and write that $last_id = $conn->insert_id, but what to use instead conn, and would it work or is there some DB insert bu chronoforms itself in between?
Also, if I was to use such custom code, how then to get that $last_id to be used with next database save-method?
Thanks in advance!