Re: QueryTool last sequence id
| From: | Wolfram Kriesing | Date: | Thu, 11 Sep 2003 08:01:14 +0000 |
| Subject: | Re: QueryTool last sequence id | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-7714@lists.php.net to get a copy of this message | ||
Joseph Blythe wrote:
Hello everyone, Have just been using QueryTool and have run into a dilemma, how would I get the last used sequence id to insert as a relationship id into another table? I have looked through the source and it doesn't look possible as the add() method does not return the used sequence id. For now I am having to use DB to query the sequence table (mysql) and select its value, but I see this is not very good as it is not DB independent, has anyone been using QT in this manner or could suggest a better way to handle this ?the method add() does return the last inserted id. For it to work properly the propoerty primaryCol has to be set to the primary column's name hth -- Wolfram ... opensource @ vision:produktion ... http://opensource.visionp.de ... authentication system .... http://sf.net/projects/auth