RE: @@identity

2004-03-10 Thread Aaron
Great - thanks! -Original Message- From: Victor Pendleton [mailto:[EMAIL PROTECTED] Sent: March 10, 2004 5:36 PM To: 'Aaron '; '[EMAIL PROTECTED] ' Subject: RE: @@identity Rough example. Assuming that you are using the same connection since last_insert_id() is

RE: @@identity

2004-03-10 Thread Victor Pendleton
Rough example. Assuming that you are using the same connection since last_insert_id() is connection specific. rset.open "INSERT INTO table1 values(someValue) " rset.open "SELECT last_insert_id() as identity" identity = rset.fields("identity") -Original Message- From: Aaron To: [EMAIL PRO

Re: @@identity

2004-03-10 Thread Rocar Peças
My Aaron, I don´t know any means to get the last inserted record into a MySQL table, as built-in command. What I would do to get this record is to have a timestamp field in the record (mmddmilisecsinday) to solve the problem. That´s it. Leandro Neves. - Original Message - From: "

Re: @@identity

2004-03-10 Thread Daniel Kasak
Aaron wrote: How can I select the last record that was inserted? An ASP/VB example would be great too! I believe you have it already. I use: select last_insert_id() as MyID but from memory @@identity is a synonym of last_insert_id() Dan -- sig Daniel Kasak IT Developer NUS Consul

Re: IDENTITY column

2003-12-23 Thread Matt Fuller
Hi, I think what you need is an auto increment (primary key) column. When a record is inserted, it will automatically generate the next number in the sequence. Being a primary key, the column must be unique (i.e no two rows can be the same), so you can identify a specify record in the table. Wh

Re: @@identity

2003-06-18 Thread danchik
. - Original Message - From: "Jonas Geiregat" <[EMAIL PROTECTED]> To: "Mysql" <[EMAIL PROTECTED]> Sent: Wednesday, June 18, 2003 1:35 PM Subject: Re: @@identity > Don Read wrote: > > >On 18-Jun-2003 Jonas Geiregat wrote: > > > > > >>I

Re: @@identity

2003-06-18 Thread Jonas Geiregat
Don Read wrote: On 18-Jun-2003 Jonas Geiregat wrote: I'm using php + mysql for my project I want to get the last insert ID. I could use the php function mysql_last_id(); but I could aslo use @@identity. Now some people have advised me NOT to use @@identity, cause it's not save buggy sometimes

Re: @@identity

2003-06-18 Thread Don Read
On 18-Jun-2003 Jonas Geiregat wrote: > I'm using php + mysql for my project > I want to get the last insert ID. > I could use the php function mysql_last_id(); > but I could aslo use @@identity. > Now some people have advised me NOT to use @@identity, cause it's not > save buggy sometimes slow ..

RE: @@identity

2003-06-18 Thread Jennifer Goodie
> One should always use the > LAST_INSERT_ID() or after an insert, select max(id) from myTable. Select max(id) from myTable should never be used to get the last insert id. On a high traffic table you are not guaranteed it will be the ID for the record you just inserted, another could have been in

Re: @@identity

2003-06-18 Thread Eric Calvert
On Wednesday 18 June 2003 13:59, Carter, Scott wrote: > This may not be the correct solution exactly, but what I do to ensure that > I get the correct ID back is the following: > > I know what I just inserted, therefore I can use this information in a > WHERE clause to ensure retrieving the correct

RE: @@identity

2003-06-18 Thread Twibell, Cory L
CTED] Sent: Wednesday, June 18, 2003 12:59 PM To: 'Jonas Geiregat'; 'Mysql' Subject: RE: @@identity This may not be the correct solution exactly, but what I do to ensure that I get the correct ID back is the following: I know what I just inserted, therefore I can use this informati

RE: @@identity

2003-06-18 Thread Carter, Scott
This may not be the correct solution exactly, but what I do to ensure that I get the correct ID back is the following: I know what I just inserted, therefore I can use this information in a WHERE clause to ensure retrieving the correct ID. Example: INSERT name='scott', age=20 into my

Re: @@IDENTITY

2002-06-21 Thread Tod Harter
ot;Arul" <[EMAIL PROTECTED]> > Sent: Friday, June 21, 2002 4:16 PM > Subject: Re: @@IDENTITY > > > You are using M$-Syntax, in MySQL you should use: > > SELECT last_insert_id() > > http://www.mysql.com/doc/e/x/example-AUTO_INCREMENT.html > > > > regar

Re: @@IDENTITY

2002-06-21 Thread Arul
Even the last_insert_id() returns 0 is it coz the table type is INNODB - Original Message - From: "Jan Peuker" <[EMAIL PROTECTED]> To: "Arul" <[EMAIL PROTECTED]> Sent: Friday, June 21, 2002 4:16 PM Subject: Re: @@IDENTITY > You are using M$-Syntax

RE: @@IDENTITY

2002-05-29 Thread Venu
> -Original Message- > From: Richard Davidson [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 29, 2002 1:31 PM > To: MySql List; [EMAIL PROTECTED] > Subject: FYI: @@IDENTITY > > > > I don't know if this is just weirdness on my system but I > thought I would > pass this on in case a