Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Get ID when inserting with Template Queries

From: Martin Dommermuth <mdommermuth(at)tssg.org>
Date: Mon Sep 03 2007 - 04:40:27 EDT


Hi,

I suppose this is somewhere in the docs, but I can't find a sane way to search for it. So please s.o. hit me with a cluestick:

I have this code:
readoutTemplate = "insert into readout values "; readoutTemplate.append("(%0, %1q, %2, %3, "); readoutTemplate.append("%4, %5, %6, %7, %8, %9, %10, %11, %12q)");

ubisenseTemplate = "insert into ubisense values "; ubisenseTemplate.append("(%0, %1, %2, %3, %4, %5q, %6q)");

Column one of readout is AUTO_INCREMENT and ubisense has a FOREIGN KEY (idreadout) REFERENCES readout(id). How can I get the ID the new row will have? Should I use SSQLS instead?

Thanks,

Martin

-- 
MySQL++ Mailing List
For list archives: 
http://lists.mysql.com/plusplus
To unsubscribe:    
http://lists.mysql.com/plusplus?unsub=lists@pantek.com
Received on Mon Sep 3 04:42:34 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 10:03:08 EDT

Do you need help?X

Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library