Re: [SR-Users] Mysql lastinsertid

2020-08-12 Thread Henning Westerholt
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.com<https://gilawa.com/>

From: sr-users  On Behalf Of Kjeld Flarup
Sent: Wednesday, August 12, 2020 10:55 PM
To: mico...@gmail.com; Kamailio (SER) - Users Mailing List 

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.dk<http://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 
mailto:mico...@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<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
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Mysql lastinsertid

2020-08-12 Thread Fred Posner
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.

-- 
Fred Posner
f...@palner.com
https://www.palner.com

Need Fred? Call Fred. 336-HEY-FRED
Matrix: @fred:matrix.lod.com



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Mysql lastinsertid

2020-08-12 Thread Kjeld Flarup

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 
mailto:mico...@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



--

- 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
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Mysql lastinsertid

2020-08-12 Thread Daniel-Constantin Mierla
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
> mailto:mico...@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
>
>
>
> -- 
>
> - 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

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Mysql lastinsertid

2020-08-12 Thread Kjeld Flarup
In the configuration file.

  Kjeld

Den ons. 12. aug. 2020 kl. 11.14 skrev Daniel-Constantin Mierla <
mico...@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
>
>

-- 

- 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


Re: [SR-Users] Mysql lastinsertid

2020-08-12 Thread Daniel-Constantin Mierla
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


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Mysql lastinsertid

2020-08-11 Thread Kjeld Flarup

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