Re: [OpenSIPS-Users] MySQL LAST_INSERT_ID() safe?

2010-12-01 Thread Chris Maciejewski
Hi Bogdan, Thanks very much for clarification. Best regards, Chris On 30 November 2010 20:21, Bogdan-Andrei Iancu wrote: > Hi Chris, > > It is safe, as opensips has a mysql connection for each process and a script > route is continuously executed by a single process.  So your queries will go >

Re: [OpenSIPS-Users] MySQL LAST_INSERT_ID() safe?

2010-11-30 Thread Bogdan-Andrei Iancu
Hi Chris, It is safe, as opensips has a mysql connection for each process and a script route is continuously executed by a single process. So your queries will go via same connection with no risk to have something else between. Regards, Bogdan Chris Maciejewski wrote: Hi, I am trying to

[OpenSIPS-Users] MySQL LAST_INSERT_ID() safe?

2010-11-26 Thread Chris Maciejewski
Hi, I am trying to figure out if is it safe to use in OpenSIPs config file: avp_db_query("INSERT INTO some_table VALUES ('data1')"); avp_db_query("SELECT LAST_INSERT_ID()","$avp(last_id);"); // do stuff with $avp(last_id); How does OpenSIPs connects to MySQL sever? Does it use some smart connec