Newly inserted record ID

Newly inserted record ID

am 30.04.2006 19:18:59 von Jonathan Gravois

Thanks to the help of this list, I am making great progress. Now this --

I have a multi-part submission form for a support application for us, the
manufacturer - the reseller's information is submitted, the customer's
information is submitted, then the warranty support information needs to be
submitted.

How can I retrieve the CustomerID after I insert a record into the customer
table in mySQL and pass it to the CSQdetails.php page?

Thanks,
Jon

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

Re: Newly inserted record ID

am 30.04.2006 19:35:44 von Stut

JONATHAN GRAVOIS wrote:
> Thanks to the help of this list, I am making great progress. Now this --
>
> I have a multi-part submission form for a support application for us, the
> manufacturer - the reseller's information is submitted, the customer's
> information is submitted, then the warranty support information needs to be
> submitted.
>
> How can I retrieve the CustomerID after I insert a record into the customer
> table in mySQL and pass it to the CSQdetails.php page?

http://php.net/mysql_insert_id

And please please please please please read the freaking manual before
asking questions here!

-Stut

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

Re: Newly inserted record ID

am 30.04.2006 19:53:05 von Skip Evans

I am very new to the list, but I get the
impression that Jonathan below is rather new to
programming in PHP/MySQL and lists like these are
great resources for people without the many years
of experience some of us have.

And while mysql_insert_id() is old hat to most of
us, to people with less experience it is not so
obvious.

So I'm always dissapointed to see more experienced
programmers say things like Stut has said below
because they tend to intimiate inexperienced
coders, make them shy away from asking questions
out of fear that gurus like Stut will say the
kinds of things he has said below.

For this reason I'm going to unsubscribe from the
list, lest I ask a question and get similar treatment.

Jonathan, if you have any other questions you feel
might get you jumped on again for asking please
feel free to email me directly.

And Stut, please please please please please
consider other peoples' feelings before you go
shooting off your "freaking" mouth.

Jonathan probably is reading the manual, but may
missed the small section on mysql_insert_id(). And
for that he doesn't deserve your scron.

Sign me, ... unsubscribed from this list,
Skip

Stut wrote:
> JONATHAN GRAVOIS wrote:
>
>> Thanks to the help of this list, I am making great progress. Now this --
>>
>> I have a multi-part submission form for a support application for us, the
>> manufacturer - the reseller's information is submitted, the customer's
>> information is submitted, then the warranty support information needs
>> to be
>> submitted.
>>
>> How can I retrieve the CustomerID after I insert a record into the
>> customer
>> table in mySQL and pass it to the CSQdetails.php page?
>
>
> http://php.net/mysql_insert_id
>
> And please please please please please read the freaking manual before
> asking questions here!
>
> -Stut
>

--
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240

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

Re: Newly inserted record ID

am 30.04.2006 21:28:15 von Stut

Skip Evans wrote:
> I am very new to the list, but I get the impression that Jonathan below
> is rather new to programming in PHP/MySQL and lists like these are great
> resources for people without the many years of experience some of us have.
>
> And while mysql_insert_id() is old hat to most of us, to people with
> less experience it is not so obvious.

While I agree that we should be here to help people who are new to this
topic I find people who ask very basic questions (which this was, a
quick look at the mysql docs on php.net would have answered this)
without making any effort at all to find the right answer really annoy me.

In my experience putting in that bit of effort pays greater dividends
than having all the answers served up piecemeal on a silver platter by
people on mailing lists. That way you'll never learn.

> So I'm always dissapointed to see more experienced programmers say
> things like Stut has said below because they tend to intimiate
> inexperienced coders, make them shy away from asking questions out of
> fear that gurus like Stut will say the kinds of things he has said below.
>
> For this reason I'm going to unsubscribe from the list, lest I ask a
> question and get similar treatment.

I find that to be a very strange way of looking at the situation. If you
don't agree with me and feel that people that don't make any kind of
effort should get the answers handed to them, the logical thing to do is
to stay on the list and do the handing out. These resources are what the
participants make of them - nobody is paid to help out here.

> Jonathan, if you have any other questions you feel might get you jumped
> on again for asking please feel free to email me directly.

Which defeats the object of these lists since the answers will not be
available to others who search the archives. And before you say an RTFM
answer is no better, at least if someone looking lands on a pointer to
the manual they will know where to look next, and by searching for the
answer they have put some effort into finding the answer.

> And Stut, please please please please please consider other peoples'
> feelings before you go shooting off your "freaking" mouth.

If what I said hurt someones feelings then I apologise, but I hope my
above explanation gives acceptable reasons for my attitude to questions
like this.

> Jonathan probably is reading the manual, but may missed the small
> section on mysql_insert_id(). And for that he doesn't deserve your scron.

I saw no mention of this manual reading in the original post, which does
not necessarily mean it's not happening, but this particular problem
would easily be found by also searching the archives of this list.

Flame away.

-Stut

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