On Fri, 19 Jan 2001, Jacky@lilst wrote:
Can I just write a query to retrive UserID right after I have inserted
user detail into Usertable? and then assign into a variable and use
that value to insert into UserID field in another table?
like this:
$getID = "select userID from user";
$query = "insert into user values
('firstname','lastname','address','phone')";
$resultinsert = mysql_query($query);
$getID = "select userID from user"; // Will this get me the
// Id of the record I just inserted?
$resultID = mysql_query($getID);
No, it
PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, January 18, 2001 11:56 PM
Subject: RE: [PHP] Not quite relevant question about coding and query
$query = "insert into user values
('firstname','lastname','address','phone')";
$resultinsert = mysql_query($query);
$getID = &quo
-Original Message-
From: Jason Murray [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 18, 2001 9:57 PM
To: 'Jacky@lilst'; [EMAIL PROTECTED]
Subject: RE: [PHP] Not quite relevant question about coding and query
$query = "insert into user values
('firstname','lastname','ad
TED] To: 'Jacky@lilst'
[EMAIL PROTECTED]; [EMAIL PROTECTED] Sent:
Thursday, January 18, 2001 11:56 PM Subject: RE: [PHP] Not quite
relevant question about coding and query
$query = "insert into user values
('firstname','lastname','address','phone')";
$resultinsert = mysql_quer
l Message -
From: [EMAIL PROTECTED]
To: Jacky@lilst [EMAIL PROTECTED]; Jason Murray
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, January 19, 2001 12:36 AM
Subject: Re: [PHP] Not quite relevant question about coding and query
Addressed to: "Jacky@lilst" [EMAIL PROTECTED]
aching the goal you set for
yourself"
- Original Message -
From: [EMAIL PROTECTED]
To: Jacky@lilst [EMAIL PROTECTED]; Jason Murray
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, January 19, 2001 12:36 AM
Subject: Re: [PHP] Not quite relevant question about coding and query
Addres
Addressed to: "Jacky@lilst" [EMAIL PROTECTED]
[EMAIL PROTECTED]
** Reply to note from "Jacky@lilst" [EMAIL PROTECTED] Fri, 19 Jan 2001
14:00:02 -0600
Sorry, I think it should be like this:
$queryInsert = "insert into user values ('firstname','lastname','email')";
8 matches
Mail list logo