<div>
Maybe try the RETURNING clause ?
</div>
<div><div><br></div><div>-- </div><div>Seven Du</div><div><span style="font-size: 10pt; ">http://www.freeswitch.org.cn</span></div><div>http://about.me/dujinfang</div><div><div>http://www.dujinfang.com</div></div><div><br></div><div>Sent with <a href="http://www.sparrowmailapp.com/?sig">Sparrow</a></div><div><br></div></div>
<p style="color: #A0A0A8;">On Saturday, May 25, 2013 at 8:14 AM, Lloyd Aloysius wrote:</p>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<span><div><div><div><font face="verdana, sans-serif"><div><div><font face="verdana, sans-serif"><div>Hello All</div><div><br></div><div>How to get the id value after insert a record a record using dbh:query</div><div><br></div><div><u>table_a - columns</u>.</div>
<div><br></div><div>id - auto increment</div><div>field1</div><div>field2</div><div><br></div><div><br></div><div>dbh:query("insert into table_a ( field1,field2) values ('11','Test')")</div><div>
<br></div><div><br></div><div>After insert how to get the table_a - id value for the inserted record?</div><div><br></div><div>Thanks</div><div>Lloyd</div></font></div></div></font></div>
</div><div><div>_________________________________________________________________________</div><div>Professional FreeSWITCH Consulting Services:</div><div><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a></div><div><a href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a></div><div><br></div><div>FreeSWITCH-powered IP PBX: The CudaTel Communication Server</div><div><a href="http://www.cudatel.com">http://www.cudatel.com</a></div><div><br></div><div>Official FreeSWITCH Sites</div><div><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></div><div><a href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a></div><div><a href="http://www.cluecon.com">http://www.cluecon.com</a></div><div><br></div><div>FreeSWITCH-users mailing list</div><div><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a></div><div><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></div><div>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a></div><div><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></div></div></div></span>
</blockquote>
<div>
<br>
</div>