[Devel] prepared SQL statements

Klaus Darilion klaus.mailinglists at pernau.at
Wed Apr 18 13:18:17 CEST 2007



Victor Gamov wrote:
> Hi!
> 
> Can anybody say me: is OpenSER use prepared SQL statements?

AFAIK: no

regards
klaus


> If "no" I think it must do it. It can increase productivity for many 
> modules using DB like REGISTRAR/USRLOC, ACC etc.
> 
> For modules allowing direct SQL statements (e.g. AVPOPS and ACC) it 
> possible to allow create and identify such queries as module parameter 
> and then call it. For example:
> 
> (in init section):
> modparam("avpops", "prepared_sql", "QueryName='insert into tbl set 
> cell1=?, cell2=?")
> 
> (somewhere in route()):
> avp_db_query("prepared:QueryName, value1, value2");
> 



More information about the Devel mailing list