Re: Re[2]: [PHP] A small question - Mysql_insert_id

2002-06-03 Thread Jim lucas

and you want people to actually ready your books after talking to customers
like that.  I should burn your book.  I thought you were a helping person.
If someone has a question and it is obvious that they have no clue about
what they are talking about.  shouldn't you walk them through it instead of
shitting on them and telling them to f*** off?

Just an observation

Jim Lucas
- Original Message -
From: Julie Meloni [EMAIL PROTECTED]
To: r [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Saturday, June 01, 2002 8:06 AM
Subject: Re[2]: [PHP] A small question - Mysql_insert_id


 r Actually the ID field is not null,primary and auto_increment.

 Well, it has to be of a TYPE as well...

 r Thanks for the URL but in my message I did quote the line from that
same url
 r (http://www.php.net/manual/en/function.mysql-insert-id.php)

 r I just need to get the ID of the just inserted record.

 I'm just going to assume you're f*cking with all of us and leave it at
 that.


 - Julie

 -- Julie Meloni
 -- [EMAIL PROTECTED]
 -- www.thickbook.com

 Find Sams Teach Yourself MySQL in 24 Hours at
 http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: Re[2]: [PHP] A small question - Mysql_insert_id

2002-06-03 Thread Philip Olson


Jim-

Please don't post such useless garbage to the lists.  The 
thread was dead, mistakes were made, time to move on.  We 
all make mistakes from time to time (frustration), and can 
only learn from them.  Draft folders are good.

Regards,
Philip Olson

 and you want people to actually ready your books after talking to customers
 like that.  I should burn your book.  I thought you were a helping person.
 If someone has a question and it is obvious that they have no clue about
 what they are talking about.  shouldn't you walk them through it instead of
 shitting on them and telling them to f*** off?
 
 Just an observation



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] A small question - Mysql_insert_id

2002-06-01 Thread r

Hi,
I am inserting a row into a table with this structure
id (auto increment)
name (varchar)
hits (int)

I am using
insert into mytable values(NULL,'Ryan',90);

Then according to the manual I have to use (to quote)
printf (Last inserted record has id %d\n, mysql_insert_id());

will this return the row number or the id fields value..?
If it returns the row number how do I get the ID number?
The id started at 1500.

Cheers,
-Ryan.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] A small question - Mysql_insert_id

2002-06-01 Thread Julie Meloni

r I am inserting a row into a table with this structure
r id (auto increment)
...

Assuming you mean ID int not null primary key auto_increment (or
something like that).

r Then according to the manual I have to use (to quote)
r printf (Last inserted record has id %d\n, mysql_insert_id());

r will this return the row number or the id fields value..?

FYI, you could:
a) try it and see
b) see what the manual has to say: 
http://www.php.net/manual/en/function.mysql-insert-id.php

The answer is Gets the id generated from the previous INSERT
operation.


- Julie

-- Julie Meloni
-- [EMAIL PROTECTED]
-- www.thickbook.com

Find Sams Teach Yourself MySQL in 24 Hours at
http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] A small question - Mysql_insert_id

2002-06-01 Thread r

Hey Julie,
Thanks for replying,

Actually the ID field is not null,primary and auto_increment.

Thanks for the URL but in my message I did quote the line from that same url
(http://www.php.net/manual/en/function.mysql-insert-id.php)

I just need to get the ID of the just inserted record.

Any ideas?

Cheers,
-Ryan.


 r I am inserting a row into a table with this structure
 r id (auto increment)
 ...

 Assuming you mean ID int not null primary key auto_increment (or
 something like that).

 r Then according to the manual I have to use (to quote)
 r printf (Last inserted record has id %d\n, mysql_insert_id());

 r will this return the row number or the id fields value..?

 FYI, you could:
 a) try it and see
 b) see what the manual has to say:
http://www.php.net/manual/en/function.mysql-insert-id.php

 The answer is Gets the id generated from the previous INSERT
 operation.


 - Julie

 -- Julie Meloni
 -- [EMAIL PROTECTED]
 -- www.thickbook.com

 Find Sams Teach Yourself MySQL in 24 Hours at
 http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] A small question - Mysql_insert_id

2002-06-01 Thread Stuart Dallas

On Sunday, June 2, 2002 at 4:07:31 AM, you wrote:
 will this return the row number or the id fields value..?
 If it returns the row number how do I get the ID number?
 The id started at 1500.

From the manual page for mysql_insert_id()...

mysql_insert_id() returns the ID generated for an AUTO_INCREMENT column by the
previous INSERT query

In other words, it returns the id fields value.

Don't take this the wrong way, but you clearly didn't look this up in the
manual. This list is to help with real problems, not manual lookups.

-- 
Stuart


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re[2]: [PHP] A small question - Mysql_insert_id

2002-06-01 Thread Julie Meloni

r Actually the ID field is not null,primary and auto_increment.

Well, it has to be of a TYPE as well...

r Thanks for the URL but in my message I did quote the line from that same url
r (http://www.php.net/manual/en/function.mysql-insert-id.php)

r I just need to get the ID of the just inserted record.

I'm just going to assume you're f*cking with all of us and leave it at
that.


- Julie

-- Julie Meloni
-- [EMAIL PROTECTED]
-- www.thickbook.com

Find Sams Teach Yourself MySQL in 24 Hours at
http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php