I'd like to offer an apology to you Seven and to the list in general for an inappropriate comment I made about your offer of free assistance regarding the dbh insert id. My comment was rude and uncalled for and I will behave more appropriately in the future. The mailing list is an invaluable source of help and any offers of assistance large or small should be accepted graciously. I hope you will accept this apology. Humbly, sincerely, John -----Original Message----- From: Seven Du <dujinfang@gmail.com> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Sent: Sat, May 25, 2013 12:52 pm Subject: Re: [Freeswitch-users] dbh:query - insert id Maybe try the RETURNING clause ? -- Seven Du http://www.freeswitch.org.cn http://about.me/dujinfang http://www.dujinfang.com Sent with Sparrow On Saturday, May 25, 2013 at 8:14 AM, Lloyd Aloysius wrote: Hello All How to get the id value after insert a record a record using dbh:query table_a - columns. id - auto increment field1 field2 dbh:query("insert into table_a ( field1,field2) values ('11','Test')") After insert how to get the table_a - id value for the inserted record? Thanks Lloyd _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org