, Jeff Snoxell wrote:
Date: Wed, 18 Dec 2002 12:21:14 +
From: Jeff Snoxell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Accessing last_insert_id problem.
Hi,
I'm adding records to a db using the Perl DBI. Subsequent to adding a
record I need to know the value of the auto
Jeff Snoxell wrote:
At 09:46 19/12/02 -0500, you wrote:
Jeff Snoxell wrote:
Nope. That doesn't do it either!
I go:
TRUNCATE TABLE my_table
Are you using InnoDB tables? You'll have to do something akin to ALTER
TABLE my_table AUTO_INCREMENT=1 ... at least according to Paul ... :)
I'm working with MySQL 3.23.36 so, according to MySQL, Paul Dubois, New
Riders running the query:
DELETE FROM my_table_name
should reset the auto-increment value... but it doesnt'.
What SQL do I use to reset the val.
You can't believe anything that book says. The author didn't even include
http://www.mysql.com/doc/en/SET_OPTION.html
last option(s)
maybe you can do somehting with that
Gr
At 10:54 19-12-02 +, Jeff Snoxell wrote:
I'm working with MySQL 3.23.36 so, according to MySQL, Paul Dubois, New
Riders running the query:
DELETE FROM my_table_name
should reset the
At 09:46 19/12/02 -0500, you wrote:
Jeff Snoxell wrote:
Nope. That doesn't do it either!
I go:
TRUNCATE TABLE my_table
Are you using InnoDB tables? You'll have to do something akin to ALTER
TABLE my_table AUTO_INCREMENT=1 ... at least according to Paul ... :)
No, I'm using MyISAM I
At 15:13 + 12/19/02, Jeff Snoxell wrote:
At 09:46 19/12/02 -0500, you wrote:
Jeff Snoxell wrote:
Nope. That doesn't do it either!
I go:
TRUNCATE TABLE my_table
Are you using InnoDB tables? You'll have to do something akin to
ALTER TABLE my_table AUTO_INCREMENT=1 ... at least
Hi,
I'm adding records to a db using the Perl DBI. Subsequent to adding a
record I need to know the value of the auto-incrementing 'Ref' field so
that I can place a copy of the relavent details into a log file.
I could query for the LAST_INSERT_ID but what if another process has
added another
On Wednesday 18 December 2002 14:21, Jeff Snoxell wrote:
I'm adding records to a db using the Perl DBI. Subsequent to adding a
record I need to know the value of the auto-incrementing 'Ref' field so
that I can place a copy of the relavent details into a log file.
I could query for the
Hi,
I've got that sussed now and am happily using the aquired ref to
subsequently play with the record etc. One other related problem and I
recon I'm sorted
How do I reset the auto-increment value?
I'm working with MySQL 3.23.36 so, according to MySQL, Paul Dubois, New
Riders running the
At 15:31 18-12-02 +, Jeff Snoxell wrote:
Hi,
I've got that sussed now and am happily using the aquired ref to
subsequently play with the record etc. One other related problem and I
recon I'm sorted
How do I reset the auto-increment value?
I'm working with MySQL 3.23.36 so, according
Jeff Snoxell wrote:
DELETE FROM my_table_name
should reset it... but it doesnt'.
I'm glad the DELETE FROM doesn't, or else my foreign keys would all get
screwed up :)
TRUNCATE should do what you want (as someone else pointed out).
--
Michael T. Babcock
C.T.O., FibreSpeed Ltd. ... SQL
At 12:21 + 12/18/02, Jeff Snoxell wrote:
Hi,
I'm adding records to a db using the Perl DBI. Subsequent to adding
a record I need to know the value of the auto-incrementing 'Ref'
field so that I can place a copy of the relavent details into a log
file.
I could query for the LAST_INSERT_ID
At 15:31 + 12/18/02, Jeff Snoxell wrote:
Hi,
I've got that sussed now and am happily using the aquired ref to
subsequently play with the record etc. One other related problem and
I recon I'm sorted
How do I reset the auto-increment value?
I'm working with MySQL 3.23.36 so, according
13 matches
Mail list logo