> 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
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
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
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
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
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
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
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
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
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
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
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]
12 matches
Mail list logo