Re: [PHP] manual key generation

2003-10-25 Thread Marek Kilimajer
Your question has been answered, I just want to add that you should lock your table before this query and release the lock after the new row is inserted. Joao Andrade wrote: Aloha! I have a script that inserts a new row in a table called "quotations", which has a primary key called "quo

Re: [PHP] manual key generation

2003-10-25 Thread David Otton
On Sat, 25 Oct 2003 20:31:37 -0200, you wrote: >When I enter: > >SELECT MAX(quotation_id)+1 from quotations > >I get simply the number 7 (which is ok) > >But when I do: > >$new_key = mysql_query("SELECT MAX(quotation_id)+1 from quotations") > >I get $new_key = Resource id #3 L

Re: [PHP] manual key generation

2003-10-25 Thread R'twick Niceorgaw
Joao Andrade wrote: Aloha! I have a script that inserts a new row in a table called "quotations", which has a primary key called "quotation_id". "quotation_id" is an int(11) type. When I enter: SELECT MAX(quotation_id)+1 from quotations I get simply the number 7 (which is ok) But

Re: [PHP] manual key generation

2003-10-25 Thread Ewout de Boer
- Original Message - From: "Joao Andrade" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, October 26, 2003 12:31 AM Subject: [PHP] manual key generation > > Aloha! > > I have a script that inserts a new row in a table called "quotations", > which has a primary key call