Re: 2 questions on Auto Increment fields

2005-08-05 Thread Scott Noyes
> 1) For what I see on the MySQL manual you can have an Auto Increment not > null Field as the primary key. Say that you have a table with only > two columns the first being an Auto_Increment. How do I write an INSERT > or REPLACE SQL statement to insert data on this table? Can > I write it so that

2 questions on Auto Increment fields

2005-08-05 Thread C.F. Scheidecker Antunes
Hello all, I have two question on Auto Increment fields: 1) For what I see on the MySQL manual you can have an Auto Increment not null Field as the primary key. Say that you have a table with only two columns the first being an Auto_Increment. How do I write an INSERT or REPLACE SQL statement

Re: auto increment fields

2004-09-20 Thread SGreen
Spruce Pine "Mike" <[EMAIL PROTECTED]> wrote on 09/19/2004 04:59:02 PM: > hi. > I have a rather childish question on tables and auto increment fields. > Scenario: I have a table with an field. The > deal is that everything works fine (I'm talking about the auto

RE: auto increment fields

2004-09-19 Thread Osvaldo Sommer
you will need to add a index to speed things up. Osvaldo Sommer -Original Message- From: Mike [mailto:[EMAIL PROTECTED] Sent: Sunday, September 19, 2004 2:59 PM To: [EMAIL PROTECTED] Subject: auto increment fields hi. I have a rather childish question on tables and auto increment fields

Re: auto increment fields

2004-09-19 Thread Andrew Kreps
On Sun, 19 Sep 2004 23:59:02 +0300, Mike <[EMAIL PROTECTED]> wrote: > hi. > I have a rather childish question on tables and auto increment fields. > Scenario: I have a table with an field. The > deal is that everything works fine (I'm talking about the auto > incrementat

auto increment fields

2004-09-19 Thread Mike
hi. I have a rather childish question on tables and auto increment fields. Scenario: I have a table with an field. The deal is that everything works fine (I'm talking about the auto incrementation part) until I choose to delete a row. This creates a gap in the primary key field. And my que

auto increment fields

2004-09-19 Thread Mike
hi. I have a rather childish question on tables and auto increment fields. Scenario: I have a table with an field. The deal is that everything works fine (I'm talking about the auto incrementation part) until I choose to delete a row. This creates a gap in the primary key field. And my que

Re: Auto Increment Fields

2001-10-05 Thread Kyle Hayes
On Thursday 04 October 2001 13:37, Paul DuBois wrote: > At 4:08 PM -0400 10/4/01, Jason Frisvold wrote: > >Is there a way to have DBI return the value of the auto-incremented field > >upon insert? Or do I have to insert and then do a select afterwards? > > $dbh->do ("your insert statement"); > $a

RE: Auto Increment Fields

2001-10-05 Thread Jason Frisvold
y, and I'm not sure about the former." -- Albert Einstein [1879-1955] -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 04, 2001 4:37 PM To: Jason Frisvold; '[EMAIL PROTECTED]' Subject: Re: Auto Increment Fields At 4:08 PM -0400

Re: Auto Increment Fields

2001-10-04 Thread Paul DuBois
At 4:08 PM -0400 10/4/01, Jason Frisvold wrote: >Is there a way to have DBI return the value of the auto-incremented field >upon insert? Or do I have to insert and then do a select afterwards? $dbh->do ("your insert statement"); $auto_inc = $dbh->{mysql_insertid}; -- Paul DuBois, [EMAIL PROTEC

RE: Auto Increment Fields

2001-10-04 Thread Don Read
On 04-Oct-2001 Jason Frisvold wrote: > Is there a way to have DBI return the value of the auto-incremented field > upon insert? Or do I have to insert and then do a select afterwards? > $sth->insertid; -- Don Read [EMAIL PROTECTED] -- It's always darkes

Auto Increment Fields

2001-10-04 Thread Jason Frisvold
Is there a way to have DBI return the value of the auto-incremented field upon insert? Or do I have to insert and then do a select afterwards? Thanks, --- Jason H. Frisvold Senior ATM Engineer Engineering Dept. Penteledata CCNA Certified - CSCO10151622 [EMAIL PROTECTED]