Hello
I wonder if there is some way to get the lastinsertid from an "INSERT INTO" sql_query
Hello,
do you need it in the configuration file, or inside C code?
Cheers, Daniel
On 12.08.20 00:09, Kjeld Flarup wrote:
Hello
I wonder if there is some way to get the lastinsertid from an "INSERT INTO" sql_query
-- -------------------- Med Liberalistiske Hilsner ---------------------- Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49 Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dk
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
In the configuration file.
Kjeld
Den ons. 12. aug. 2020 kl. 11.14 skrev Daniel-Constantin Mierla < miconda@gmail.com>:
Hello,
do you need it in the configuration file, or inside C code?
Cheers, Daniel
On 12.08.20 00:09, Kjeld Flarup wrote:
Hello
I wonder if there is some way to get the lastinsertid from an "INSERT INTO" sql_query
-- -------------------- Med Liberalistiske Hilsner ---------------------- Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49 Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dk
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda Funding: https://www.paypal.me/dcmierla
Have you tried to do "SELECT LAST_INSERT_ID()" with sql_query() from sqlops module?
Cheers, Daniel
On 12.08.20 11:24, Kjeld Flarup wrote:
In the configuration file.
Kjeld
Den ons. 12. aug. 2020 kl. 11.14 skrev Daniel-Constantin Mierla <miconda@gmail.com mailto:miconda@gmail.com>:
Hello, do you need it in the configuration file, or inside C code? Cheers, Daniel On 12.08.20 00:09, Kjeld Flarup wrote: > Hello > > I wonder if there is some way to get the lastinsertid from an "INSERT > INTO" sql_query > > -- > -------------------- Med Liberalistiske Hilsner ---------------------- > Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog > Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49 > Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dk <http://www.liberalismen.dk> > > > _______________________________________________ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla -- www.asipto.com <http://www.asipto.com> www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda> Funding: https://www.paypal.me/dcmierla
--
--------------------- Med Liberalistiske Hilsner ----------------------
Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49 Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dk http://www.liberalismen.dk
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hi Daniel
I can do that, but am I guaranteed, that the right value is returned?
Kamailio is multithreaded, and I do now know if the mysql connection is shared across threads.
-------------------- Med Liberalistiske Hilsner ---------------------- Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49 Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dk
On 8/12/20 12:25 PM, Daniel-Constantin Mierla wrote:
Have you tried to do "SELECT LAST_INSERT_ID()" with sql_query() from sqlops module?
Cheers, Daniel
On 12.08.20 11:24, Kjeld Flarup wrote:
In the configuration file.
Kjeld
Den ons. 12. aug. 2020 kl. 11.14 skrev Daniel-Constantin Mierla <miconda@gmail.com mailto:miconda@gmail.com>:
Hello, do you need it in the configuration file, or inside C code? Cheers, Daniel On 12.08.20 00:09, Kjeld Flarup wrote: > Hello > > I wonder if there is some way to get the lastinsertid from an "INSERT > INTO" sql_query > > -- > -------------------- Med Liberalistiske Hilsner ---------------------- > Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog > Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49 > Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dk <http://www.liberalismen.dk> > > > _______________________________________________ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla -- www.asipto.com <http://www.asipto.com> www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda> Funding: https://www.paypal.me/dcmierla
--
--------------------- Med Liberalistiske Hilsner ----------------------
Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49 Den ikke akademiske hjemmeside for liberalismen -www.liberalismen.dk <http://www.liberalismen.dk>
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla --www.asipto.com www.twitter.com/miconda --www.linkedin.com/in/miconda Funding:https://www.paypal.me/dcmierla
On Wed, 2020-08-12 at 22:55 +0200, Kjeld Flarup wrote:
Hi Daniel I can do that, but am I guaranteed, that the right value is returned? Kamailio is multithreaded, and I do now know if the mysql connection is shared across threads.
That is a general sql question, not particular to kamailio...
To me, personally, this is a good use case of a stored procedure, and then having that stored procedure return to you the information you want as a result of the sql action taken.
Hello,
Kamailio is not multi-threaded, it is multi-process. Each process opens its own connection to the DB.
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Kjeld Flarup Sent: Wednesday, August 12, 2020 10:55 PM To: miconda@gmail.com; Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: Re: [SR-Users] Mysql lastinsertid
Hi Daniel
I can do that, but am I guaranteed, that the right value is returned?
Kamailio is multithreaded, and I do now know if the mysql connection is shared across threads.
-------------------- Med Liberalistiske Hilsner ----------------------
Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog
Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dkhttp://www.liberalismen.dk On 8/12/20 12:25 PM, Daniel-Constantin Mierla wrote:
Have you tried to do "SELECT LAST_INSERT_ID()" with sql_query() from sqlops module?
Cheers, Daniel On 12.08.20 11:24, Kjeld Flarup wrote: In the configuration file.
Kjeld
Den ons. 12. aug. 2020 kl. 11.14 skrev Daniel-Constantin Mierla <miconda@gmail.commailto:miconda@gmail.com>: Hello,
do you need it in the configuration file, or inside C code?
Cheers, Daniel
On 12.08.20 00:09, Kjeld Flarup wrote:
Hello
I wonder if there is some way to get the lastinsertid from an "INSERT INTO" sql_query
-- -------------------- Med Liberalistiske Hilsner ---------------------- Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49 Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dkhttp://www.liberalismen.dk
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.comhttp://www.asipto.com www.twitter.com/micondahttp://www.twitter.com/miconda -- www.linkedin.com/in/micondahttp://www.linkedin.com/in/miconda Funding: https://www.paypal.me/dcmierla
--
--------------------- Med Liberalistiske Hilsner ----------------------
Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog
Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dkhttp://www.liberalismen.dk
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla -- www.asipto.comhttp://www.asipto.com
www.twitter.com/micondahttp://www.twitter.com/miconda -- www.linkedin.com/in/micondahttp://www.linkedin.com/in/miconda
Funding: https://www.paypal.me/dcmierla