RE: [PHP] last_insert_id function

2001-01-24 Thread Don Read
On 24-Jan-01 Mark Lipscombe wrote: > Someone jump in here and correct me if I'm wrong, but by the time you > get around to executing the second query, LAST_INSERT_ID() from MySQL > isn't necessarily going to be the desired value, because another record > may well have been inserted in that time?

Re: [PHP] last_insert_id function: I did already

2001-01-24 Thread Alain Fontaine
EMAIL PROTECTED]> > To: 'Jacky@lilst' <[EMAIL PROTECTED]>; 'Mark Lipscombe' > <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Wednesday, January 24, 2001 4:06 AM > Subject: RE: [PHP] last_insert_id function > > > > I am not really

Re: [PHP] last_insert_id function: I did already

2001-01-24 Thread [EMAIL PROTECTED]
From: Jacky@lilst [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 25, 2001 7:53 AM > To: Maxim Maletsky; 'Mark Lipscombe' > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] last_insert_id function > > > Can we store the value retrieved by last_insert_id for later use? say we

Re: [PHP] last_insert_id function

2001-01-24 Thread Alain Fontaine
mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 25, 2001 7:53 AM > To: Maxim Maletsky; 'Mark Lipscombe' > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] last_insert_id function > > > Can we store the value retrieved by last_insert_id for later use? say we > want to r

RE: [PHP] last_insert_id function

2001-01-24 Thread Maxim Maletsky
e' Cc: [EMAIL PROTECTED] Subject: Re: [PHP] last_insert_id function Can we store the value retrieved by last_insert_id for later use? say we want to related 3 queries together and under that case, we will then need to store the first "last_insert_id value" somewhere and the

Re: [PHP] last_insert_id function

2001-01-24 Thread [EMAIL PROTECTED]
<[EMAIL PROTECTED]> Sent: Wednesday, January 24, 2001 3:36 AM Subject: RE: [PHP] last_insert_id function > no it will keep it very well. In fact most common errors with this function > is that it still keeps the same value when you do something wrong. > > This issue is described in m

RE: [PHP] last_insert_id function

2001-01-24 Thread Maxim Maletsky
#x27;Jacky@lilst'; [EMAIL PROTECTED] Subject: RE: [PHP] last_insert_id function Yes, except that in the second case you first will have to do the insertion of $sql and then assign $lastId to mysql_insert_id(); Cheers, Maxim Maletsky -Original Message- From: Jacky@lilst [mailto:[EMAIL P

RE: [PHP] last_insert_id function

2001-01-24 Thread Maxim Maletsky
PROTECTED] Subject: Re: [PHP] last_insert_id function So can I do either way as I show below here? first could be : $sql = "insert into user (name,email) values('Jack','[EMAIL PROTECTED]')"; $result = mysql_query($sql); $sql1 = "insert into userFriend (userId

RE: [PHP] last_insert_id function

2001-01-24 Thread Maxim Maletsky
. Cheers, Maxim Maletsky -Original Message- From: Mark Lipscombe [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 25, 2001 5:28 AM To: Maxim Maletsky Cc: 'Jacky@lilst'; [EMAIL PROTECTED] Subject: RE: [PHP] last_insert_id function Someone jump in here and correct me if I'

Re: [PHP] last_insert_id function

2001-01-24 Thread [EMAIL PROTECTED]
ohn');" $result1 = mysql_query($sql1); Are these correct? Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself" - Original Message - From: Maxim Maletsky <[EMAIL PROTECTED]> To: 'Jacky@lilst' <[EM

RE: [PHP] last_insert_id function

2001-01-24 Thread Mark Lipscombe
y@lilst [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 25, 2001 7:16 AM > To: [EMAIL PROTECTED] > Subject: [PHP] last_insert_id function > > > I got this quote right out of the php manual. My Id field happen to be type > BIGINT as it said so I tried using LAST_INSERT

RE: [PHP] last_insert_id function

2001-01-24 Thread Maxim Maletsky
_INSERT_ID()"; LAST_INSERT_ID() will be here equal to the auto_incremented id of the first $SQL statement. Hope this helps, Maxim Maletsky -Original Message- From: Jacky@lilst [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 25, 2001 7:16 AM To: [EMAIL PROTECTED] Subject: [PHP] la

RE: [PHP] last_insert_id function

2001-01-24 Thread Maxim Maletsky
PROTECTED] Subject: [PHP] last_insert_id function I got this quote right out of the php manual. My Id field happen to be type BIGINT as it said so I tried using LAST_INSERT_ID(); and turn out to be error said "unidentified function". Any clue? *** mysql

[PHP] last_insert_id function

2001-01-24 Thread [EMAIL PROTECTED]
I got this quote right out of the php manual. My Id field happen to be type BIGINT as it said so I tried using LAST_INSERT_ID(); and turn out to be error said "unidentified function". Any clue? *** mysql_insert_id() converts the return type of the native