[OpenSIPS-Users] MySQL LAST_INSERT_ID() safe?

Chris Maciejewski chris at wima.co.uk
Fri Nov 26 21:30:32 CET 2010


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
connection pooling maybe, which could result in unexpected behaviour?

Regards,
Chris



More information about the Users mailing list