Re: auto_increment

2001-05-04 Thread Thalis A. Kalfigopoulos
Check out the myisamchk manual page and the --set-auto-increment[=value] flag. regards, thalis On Fri, 4 May 2001, Stefan Wehowsky wrote: Let´s say I got a column id that is of type tinyint and has the extra auto_increment. Let´s further say that I have 50 entries in that column. Now if I

Auto_increment or manual??

2001-05-03 Thread Patrick Calkins
Hello! I have a database with about 10 tables in it. In every table I have a RECORD_ID field so that I can at least uniquely identify a row if I need to, also its used in relationships. The question is should I use the AUTO_INCREMENT for this, or should I manually generate this value, getting

Re: Auto_increment or manual??

2001-05-03 Thread lists
a row if I need to, also its used in relationships. The question is should I use the AUTO_INCREMENT for this, or should I manually generate this value, getting the next highest number, then putting it in there. Is there any known replication problems if I use AUTO_INCREMENT??? Would I be safer

RE: Auto_increment or manual??

2001-05-03 Thread Patrick Calkins
identify a row if I # need to, also its # used in relationships. The question is should I use the # AUTO_INCREMENT for # this, or should I manually generate this value, getting the # next highest # number, then putting it in there. Is there any known # replication problems if # I use

Re: RE: Auto_increment or manual??

2001-05-03 Thread Chris Lambrou [CGL]
the # AUTO_INCREMENT for # this, or should I manually generate this value, getting the # next highest # number, then putting it in there. Is there any known # replication problems if # I use AUTO_INCREMENT??? Would I be safer in just doing this # manually myself # in my code?? This is going to be a web

RE: Auto_increment or manual??

2001-05-03 Thread Chris Bolt
http://www.mysql.com/doc/R/e/Replication_Features.html Replication will be done correctly with AUTO_INCREMENT, LAST_INSERT_ID, and TIMESTAMP values. This sounds encouraging, but are there any known problems with the MySQL replication model currently available?? Would the slave servers have

RE: Auto_increment or manual??

2001-05-03 Thread Patrick Calkins
/Replication_Features.html # # Replication will be done correctly with AUTO_INCREMENT, # LAST_INSERT_ID, and # TIMESTAMP values. # # This sounds encouraging, but are there any known problems # with the MySQL # replication model currently available?? Would the slave # servers have the # same auto_inc

RE: Auto_increment or manual??

2001-05-03 Thread Chris Bolt
Yes, I know from experience, it's the best way to do it. And if you need to get the number generated by an auto_increment column in an insert, you can use last_insert_id() (or mysql_insert_id() with php). Thank you Chris with this info! This will greatly help me out, so as I see it now

Re: auto_increment dissapearing

2001-04-23 Thread Sinisa Milivojevic
in the auto_increment value for me. Eventually I started using mysqlimport to put records into this same table. When the text file had NULL for the auto_increment field, mysqlimport would count that as a warning. Wanting to get mysqlimport to run warning free I tried changing the values from

Re: Auto_Increment

2001-04-16 Thread Gerald Clark
1. No, unless you use ISAM tabbes ( See the Manual ) 2. Index Sequential Access Method. Jamie S Buchanan wrote: Hello, I wonder if you can help me. For a university project I've got a database with several tables using columns set up with 'auto_increment'. I've discovered that the value

Auto_Increment

2001-04-15 Thread Jamie S Buchanan
Hello, I wonder if you can help me. For a university project I've got a database with several tables using columns set up with 'auto_increment'. I've discovered that the value that the system creates for a new record is one greater than the largest one which has existed even if the records

Re: Auto_Increment

2001-04-15 Thread Roel Vanhout
On Sun, Apr 15, 2001 at 08:20:10PM +0100, Jamie S Buchanan wrote: And what exactly are myISAM and ISAM tables? http://www.mysql.com/documentation/mysql/bychapter/manual_Table_types.html#Table_types (a quick web search gave me: -the Information centre for South African Music

Re: Global AUTO_INCREMENT ???

2001-04-10 Thread Gerald Clark
Or insert a record, get the lastinsertid, and delete the record. Keeps the file small and guarantees a unique number every time. Cal Evans wrote: Make a table in your database called ID Create table ID (ID bigint auto_increment not null, lockedBy varchar(10) null

Global AUTO_INCREMENT ???

2001-04-09 Thread Jean-Philippe Côté
Hi everybody, I'm new to MySQL and I'm trying to figure out a way of automatically generating a sequence of unique id numbers in many tables. I need to get new id's at any time and possibly from different connections. As I understand, AUTO_INCREMENT does this, but the sequence it generates

RE: Global AUTO_INCREMENT ???

2001-04-09 Thread Cal Evans
Make a table in your database called ID Create table ID (ID bigint auto_increment not null, lockedBy varchar(10) null}; Then write code in your favorite language that: Checks to see if the record is locked by another user. if so, loop. Updates the record with a unique session

using ALTER TABLE to make existing column AUTO_INCREMENT ??

2001-03-26 Thread jon
ive gotten along pretty well with mysql and online docs. but now i am stumped and hoping for a little kick in the right direction. i have a column in a table which is the primary key and is an int. how do i make it also be auto_increment? the table already has some data in it, so i suspect

Re: using ALTER TABLE to make existing column AUTO_INCREMENT ?? [solved]

2001-03-26 Thread jon
modify column id int auto_increment; Query OK, 7 rows affected (0.01 sec) Records: 7 Duplicates: 0 Warnings: 0 i guess what this does is lets mysql know where to start counting for the auto_increment, so it doesnt complain about the cryptic "ERROR 1062: Duplicate entry '1' for

Re: using ALTER TABLE to make existing column AUTO_INCREMENT ??

2001-03-26 Thread Jason Landry
try alter table fixtures change id id int auto_increment Notice that the two references to "id" are intentional! - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 26, 2001 2:44 PM Subject: using ALTER TABLE to make existing column AUTO

importing data into a table with auto_increment

2001-03-18 Thread Daniel Kirk
hi there, is there a problem with importing data into a table with an auto_increment field with a primary key, if the data contains values for the auto_increment field? I keep getting an error that it can't insert the value "1" more than once. However, all the values for the auto

INSERT DELAYED and auto_increment: NULL or 0?

2001-03-08 Thread Lance Lovette
I am confused about the way INSERT DELAYED reacts to setting an auto_increment field to NULL. I am inserting records into a table where one of the columns is auto_increment. Usually when setting the value of an auto_increment field in an INSERT query I pass a value of NULL. When I do the same

insert + AUTO_INCREMENT

2001-03-05 Thread Joris Kluivers
hi, i have a problem i have a database table created with the statement: CREATE TABLE chatmessages (id tinyint(6) DEFAULT '0' NOT NULL AUTO_INCREMENT, message text, username varchar(100), UNIQUE id (id); I insert records with: INSERT INTO chatmessages (message, username) VALUES ('this is my

RE: insert + AUTO_INCREMENT

2001-03-05 Thread Cal Evans
check the archive, someone answered that one this weekend. Cal http://www.calevans.com -Original Message- From: Joris Kluivers [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 04, 2001 5:56 AM To: [EMAIL PROTECTED] Subject: insert + AUTO_INCREMENT hi, i have a problem i have

Re: insert + AUTO_INCREMENT

2001-03-05 Thread Robert Vetter
Joris Kluivers wrote: hi, i have a problem i have a database table created with the statement: CREATE TABLE chatmessages (id tinyint(6) DEFAULT '0' NOT NULL AUTO_INCREMENT, message text, username varchar(100), UNIQUE id (id); I insert records with: INSERT INTO chatmessages (message

RE: insert + AUTO_INCREMENT

2001-03-05 Thread Johnny Withers
messages (hopefully). use an unsigned integer CREATE TABLE chatmessages (id INT UNSIGNED DEFAULT '0' NOT NULL AUTO_INCREMENT, message text, username varchar(100), UNIQUE id (id); this will allow for 4,294,967,295 messages. -Original Message- From: Joris Kluivers [mailto:[EMAIL PROTECTED

Antwort: Re: [auto_increment]

2001-03-01 Thread alexander . skwar
On 28.02.2001 22:51:12 Jason Landry wrote: Well, except that the value of an auto-increment field CAN be set to a specific value (perhaps negative) an INSERT or UPDATE statement. As long as the value is != 0 for INSERT statements.

Why Heap Tables doesn´t support auto_increment colums

2001-03-01 Thread Gerhard Schmidt
Hi, I wounder why there is no support for Auto_increment fields in Heap tables. I know there is a problem with the uniqueness of this columns but some times the uniqueness of the column is only needes as long as the heap table exists. Im currently working on system for Managing http Session

Re: [auto_increment]

2001-03-01 Thread Thomas Riemer
There is entirely unexpected behavior here. If you have gone to the trouble of defining a column in your database as an auto_increment field it should not simply stop working because you enter a negative number. What we saw yesterday was the addition of a row with a negative number

Re: auto_increment

2001-02-28 Thread Bard dZen
Well it isn't. I created a table with auto_increment, added 25 records, deleted 5, did an insert, and the next auto number was 21. From: Steve Ruby [EMAIL PROTECTED] To: John Tsangaris [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: auto_increment Date: Mon, 26 Feb 2001 15:02:38 -0700

RE: auto_increment

2001-02-28 Thread Julian Strickland
: auto_increment Well it isn't. I created a table with auto_increment, added 25 records, deleted 5, did an insert, and the next auto number was 21. From: Steve Ruby [EMAIL PROTECTED] To: John Tsangaris [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: auto_increment Date: Mon, 26 Feb 2001 15:02

Re: [auto_increment]

2001-02-28 Thread Jason Landry
Well, except that the value of an auto-increment field CAN be set to a specific value (perhaps negative) an INSERT or UPDATE statement. If Autoincrement can only work with positive numbers, then any key that is auto_increment should automatically be made unsigned

auto_increment

2001-02-26 Thread John Tsangaris
If I turn on auto increment and let it do it's thing and then later on delete a few of the entries (let's say 1, 2, 3) and the current high entry has an id of 45.. why does mysql continue with 46 instead of using up 1, 2, and 3 first? Is there a way to bypass this? John

Re: auto_increment

2001-02-26 Thread Atle Veka
what version of mysql are you using? AFAIK, this behavior is only supported in 3.23.x Atle On Mon, 26 Feb 2001, John Tsangaris wrote: If I turn on auto increment and let it do it's thing and then later on delete a few of the entries (let's say 1, 2, 3) and the current high entry has an

Re: auto_increment

2001-02-26 Thread Jeremy D. Zawodny
first? Is there a way to bypass this? Logically, going from 45 to 1 or 2 or 3 isn't an "increment", it's a decrement. If you never want holes in the series, then auto_increment may not be the best option for you... Jeremy -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yah

Re: auto_increment

2001-02-26 Thread Steve Ruby
for the references to point to the new 1,2,3. Of course you should probably delete the references but if you didn't it would be confusing that you had pointers to the wrong lines. The point is that auto_increment generates UNIQUE values, and those values should be unique for the life of the table

RE: auto_increment

2001-02-26 Thread Cal Evans
; John Tsangaris Cc: [EMAIL PROTECTED] Subject: RE: auto_increment I'm using 3.22.23 :/ I think I may have to implement my own auto_increment to capture deleted id's. Thanx. John -Original Message- From: Atle Veka [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 1:53 PM

RE: auto_increment

2001-02-26 Thread John Tsangaris
it. :) Just checking my options. John -Original Message- From: Cal Evans [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 2:35 PM To: John Tsangaris; Atle Veka Cc: [EMAIL PROTECTED] Subject: RE: auto_increment Just curious, is there a specific business rule that requires you to have

auto_increment and last_insert_value()

2001-02-19 Thread Doug Linley
I have a table that I created that has a primary key field that should be auto_incremented. To fill in this value I am calling insert into player_table(playerid, player_name) values (LAST_INSERT_ID() + 1, '$player_name'); My problem is that I'm getting duplicated key values because

RE: auto_increment and last_insert_value()

2001-02-19 Thread Quentin Bennett
client might already have used that value. Regards Quentin -Original Message- From: Doug Linley [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 20 February 2001 11:33 To: [EMAIL PROTECTED] Subject: auto_increment and last_insert_value() I have a table that I created that has a primary k

Re: auto_increment and last_insert_value()

2001-02-19 Thread Minh Dam
Hi Doug, Try to use insert into player_table(playerid, player_name) values (auto, '$player_name); Cheers, Minh Dam On Mon, 19 Feb 2001, Doug Linley wrote: I have a table that I created that has a primary key field that should be auto_incremented. To fill in this value I am calling

Re: auto_increment problem with mysql 3.23.32

2001-02-15 Thread Sinisa Milivojevic
William R. Mussatto writes: On Wed, 14 Feb 2001, Sinisa Milivojevic wrote: can an auto_increment column also have the attribute "unsigned" safely? Sincerely, William Mussatto, Senior Systems Engineer CyberStrategies, Inc ph. 909-920-9154 ext. 27 Yes it can.

auto_increment problem with mysql 3.23.32

2001-02-14 Thread Gábor Lénárt
| ++--++++-+++---++--+--+-+---+ I've tried use 0 or NULL as value for 'id' when doing the insert query. The structure of table 'cikk' is: CREATE TABLE cikk ( id bigint(20) NOT NULL auto_increment, cim varchar

Re: auto_increment problem with mysql 3.23.32

2001-02-14 Thread Sinisa Milivojevic
cikk ( id bigint(20) NOT NULL auto_increment, cim varchar(200), cimurl varchar(100), cimkep mediumblob, szoveg text, hszoveg text, fontos enum('Y','N') DEFAULT 'Y' NOT NULL, forras varchar(200), forrasurl varchar(100), feldatum timestamp(14), felvitte

Re: auto_increment problem with mysql 3.23.32

2001-02-14 Thread Gábor Lénárt
accurate bug report on this topic. I created a test table containing only an 'auto_increment' field named 'id'. If I insert values with '0' as id in the insert query, everything works fine (incremented values). AND NOW THE TRICK: I inserted -1 to the table. And after THIS, all of my insert queries even

Re: auto_increment problem with mysql 3.23.32

2001-02-14 Thread Sinisa Milivojevic
). Till that I have got a more accurate bug report on this topic. I created a test table containing only an 'auto_increment' field named 'id'. If I insert values with '0' as id in the insert query, everything works fine (incremented values). AND NOW THE TRICK: I inserted -1 to the table

Re: auto_increment problem with mysql 3.23.32

2001-02-14 Thread Gábor Lénárt
and negative values in general, are actually not suported in auto_increment columns. OK, it's right and clean for me now ;-) But what can I do if I DONE this before? For example one of the development group members at our firm try this. Of course I can remove all of the records inserted

Re: auto_increment problem with mysql 3.23.32

2001-02-14 Thread William R. Mussatto
On Wed, 14 Feb 2001, Sinisa Milivojevic wrote: Date: Wed, 14 Feb 2001 16:21:31 +0200 (EET) From: Sinisa Milivojevic [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: auto_increment problem with mysql 3.23.32 snip.. Hi! The above is actually documented

Caching Bug with AUTO_INCREMENT columns

2001-02-13 Thread christoph . schemainda
From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Caching Bug with AUTO_INCREMENT columns Description: When i use a table with an AUTO_INCREMENT column and insert Data in the Table with a NULL Value for the AUTO_INCREMENT column, AUTO_INCREMENT sets an new value

Re: Caching Bug with AUTO_INCREMENT columns

2001-02-13 Thread Peter Skipworth
parameter ? *slightly blank look* P On Tue, 13 Feb 2001 [EMAIL PROTECTED] wrote: From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Caching Bug with AUTO_INCREMENT columns Description: When i use a table with an AUTO_INCREMENT column and insert Data in the Table

auto_increment

2001-02-08 Thread Paul E. Miller
I encountered something really handy while playing around with mysql. The documented behavior for auto_increment is that it uses the next highest number no matter what. I noticed though, when I have a two element primary key, that the auto_increment behavies in a majik uber-cool way. I want

Re: auto_increment

2001-02-08 Thread Paul DuBois
At 4:00 PM -0500 2/8/01, Paul E. Miller wrote: I encountered something really handy while playing around with mysql. The documented behavior for auto_increment is that it uses the next highest number no matter what. I noticed though, when I have a two element primary key

The function of auto_increment and Premier Key?

2001-01-19 Thread SED
Hi I'm relatively new to MySQL though I familiar to other simple databases. I have been reading the manual but not doing well understanding the function of auto_increment and Premier Key. Lets say I have a table with a few columns. One of them is an ID with auto_increment. It has 1000 rows. If I

RE: AUTO_INCREMENT question

2001-01-17 Thread Quentin Bennett
HI, Yes, but unfortunately, you need to upgrade to 3.23 to get this behavior. Regards Quentin -Original Message- From: luisma [mailto:[EMAIL PROTECTED]] Sent: Thursday, 18 January 2001 12:03 To: [EMAIL PROTECTED] Subject: AUTO_INCREMENT question I have a column, lets say &qu

Still unable to auto_increment!!!

2001-01-14 Thread David A. Enete
; ++--+--+-+-+-- --+--+ | Field | Type | Null | Key | Default | Extra | Privileges | ++--+--+-+-+-- --+--+ | uid| int(11) | | PRI | NULL| auto_increment | select,insert

RE: Still unable to auto_increment!!!

2001-01-14 Thread Carsten H. Pedersen
; ++--+--+-+-+-- --+--+ | Field | Type | Null | Key | Default | Extra | Privileges | ++--+--+-+-+-- --+--+ | uid| int(11) | | PRI | NULL| auto_increment

auto_increment not to start

2001-01-14 Thread Issam W. Alameh
Hello, I am using an auto_increment field, every time I delete from the table, the counter goes back, is there any way to keep the incrementation regardless of the number reached after delete Regards Issam - Before posting

Re: Still unable to auto_increment!!! Thanks!

2001-01-14 Thread David A. Enete
Thanks to those who replied. The solution was to drop the table and then rebuild it. It was originally populated with a negative number (yes, we know about the negative problem with auto incrementation), which caused the max value to show up. I did not know that you cannot simply delete

<    2   3   4   5   6   7