Fw: Inserting a value in an autoincrement list?

2007-10-31 Thread Mulyadi
mysql@lists.mysql.com - Original Message - From: Sebastian Mendel <[EMAIL PROTECTED]> To: Richard <[EMAIL PROTECTED]> Cc: Sent: Wednesday, October 31, 2007 3:11 PM Subject: Re: Inserting a value in an autoincrement list? > Richard schrieb: > > I want to have a list

Re: Inserting a value in an autoincrement list?

2007-10-31 Thread Sebastian Mendel
Richard schrieb: > I want to have a list of titles to which I can add new ones either at > the end of the list or in a chosen position so I can choose what order > they show up in. > > The first solution that I thought of was to add one to all of the > position values heigher than the position I w

Inserting a value in an autoincrement list?

2007-10-30 Thread Richard
Hello, I'm programming with PHP+Mysql a CMS system to easily update my site. I want to have a list of titles to which I can add new ones either at the end of the list or in a chosen position so I can choose what order they show up in. The first solution that I thought of was to add one to all

Re: Adding a new autoincrement field to an existing table

2007-02-28 Thread Nils Meyer
Grant Griffith wrote: I am trying to add an autoincrement field to a table that already exists and I keep receiving errors when trying to do it. Can someone point me in the right direction on how I can do this? I have access via Webadmin and phpMyAdmin, so I can try it however I need to

Re: help trying to add an autoincrement col to an exisiting table

2006-11-02 Thread Rolando Edwards
IQUE KEY id (id), KEY dir_users (dir), KEY seminar_users (seminar), KEY user_lvl_idx (level) ); - Original Message - From: Randy Paries <[EMAIL PROTECTED]> To: mysql@lists.mysql.com Sent: Wednesday, November 1, 2006 9:23:55 PM GMT-0500 US/Eastern Subject: help trying to add an autoin

help trying to add an autoincrement col to an exisiting table

2006-11-01 Thread Randy Paries
default '', seminar int(11) NOT NULL default '0', getnewsletter int(11) default '0', PRIMARY KEY (uname), KEY uname_users (uname), KEY dir_users (dir), KEY seminar_users (seminar), KEY user_lvl_idx (level) ) TYPE=MyISAM; I want to add an autoincrement field when i f

Re: How to Find Most Recent Autoincrement Index Assigned???

2006-04-22 Thread Rhino
- Original Message - From: "David T. Ashley" <[EMAIL PROTECTED]> To: Sent: Saturday, April 22, 2006 12:53 AM Subject: How to Find Most Recent Autoincrement Index Assigned??? I'm using PHP, and I sometimes INSERT new records in a table. MySQL assigns a new au

Re: How to Find Most Recent Autoincrement Index Assigned???

2006-04-22 Thread abhishek jain
-+ > | 5 | > ++ > 1 row in set (0.00 sec) > > So it appears you can use either of the three variables > above to achieve the same effect. > > Regards > > Keith > > On Sat, 22 Apr 2006, Michael Stassen wrote: > > > To: David T

Re: How to Find Most Recent Autoincrement Index Assigned???

2006-04-22 Thread mysql
eith On Sat, 22 Apr 2006, Michael Stassen wrote: > To: David T. Ashley <[EMAIL PROTECTED]> > From: Michael Stassen <[EMAIL PROTECTED]> > Subject: Re: How to Find Most Recent Autoincrement Index Assigned??? > > David T. Ashley wrote: > > I'm using PHP, and

Re: How to Find Most Recent Autoincrement Index Assigned???

2006-04-21 Thread Michael Stassen
David T. Ashley wrote: I'm using PHP, and I sometimes INSERT new records in a table. MySQL assigns a new autoincrement int field on each INSERT ... nothing surprising there. It goes 1, 2, 3, etc. What query can I use to find out what value this int autoincrement assigned field was? I cou

How to Find Most Recent Autoincrement Index Assigned???

2006-04-21 Thread David T. Ashley
I'm using PHP, and I sometimes INSERT new records in a table. MySQL assigns a new autoincrement int field on each INSERT ... nothing surprising there. It goes 1, 2, 3, etc. What query can I use to find out what value this int autoincrement assigned field was? I could of course SELECT bas

Re: Question about autoincrement ID

2006-03-23 Thread mysql
On Thu, 23 Mar 2006 [EMAIL PROTECTED] wrote: > > To: saf <[EMAIL PROTECTED]> > From: [EMAIL PROTECTED] > Subject: Re: Question about autoincrement ID > > One important thing to remember: You should not let UI > design requirements dictate your DB design. Most

Re: Question about autoincrement ID

2006-03-23 Thread SGreen
[EMAIL PROTECTED] (saf) wrote on 03/23/2006 11:10:04 AM: > On Thu, Mar 23, 2006 at 11:04:55AM -0500, [EMAIL PROTECTED] wrote: > > [EMAIL PROTECTED] (saf) wrote on 03/23/2006 10:50:10 AM: > > > > The short answer is "no". The Record #2 already existed. It's current > > status is "deleted". If yo

Re: Question about autoincrement ID

2006-03-23 Thread Martijn Tonies
>So I must do a big SELECT and then check my self every time (for each INSERT), >which IDs are free? No, you just ignore "deleted" IDs. What's the point? Martijn Tonies Database Workbench - development tool for MySQL, and more! Upscene Productions http://www.upscene.com My thoughts: http://blog

Re: Question about autoincrement ID

2006-03-23 Thread saf
On Thu, Mar 23, 2006 at 04:17:44PM +, [EMAIL PROTECTED] wrote: > Lots of ways round this. Instead of deleting records, add a boolean > "deleted" flag. All selects then need to add "and deleted = 0". But you can > find a (random) deleted row with "select id from table where deleted = 1 > limit 1

Re: Question about autoincrement ID

2006-03-23 Thread Alec . Cawley
[EMAIL PROTECTED] (saf) wrote on 23/03/2006 16:10:04: > On Thu, Mar 23, 2006 at 11:04:55AM -0500, [EMAIL PROTECTED] wrote: > > [EMAIL PROTECTED] (saf) wrote on 03/23/2006 10:50:10 AM: > > > > The short answer is "no". The Record #2 already existed. It's current > > status is "deleted". If you h

Re: Question about autoincrement ID

2006-03-23 Thread saf
On Thu, Mar 23, 2006 at 11:04:55AM -0500, [EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] (saf) wrote on 03/23/2006 10:50:10 AM: > > The short answer is "no". The Record #2 already existed. It's current > status is "deleted". If you had other tables that linked their data to > record #2 and you cre

Re: Question about autoincrement ID

2006-03-23 Thread SGreen
[EMAIL PROTECTED] (saf) wrote on 03/23/2006 10:50:10 AM: > Hi, > > I have a question about autoincremend id: > If I have an autoincrement id set on my first column field of my > table and I have the > following entries: > 1 > 3 > > And then I make a INSERT INTO

Question about autoincrement ID

2006-03-23 Thread saf
Hi, I have a question about autoincremend id: If I have an autoincrement id set on my first column field of my table and I have the following entries: 1 3 And then I make a INSERT INTO foobar VALUES(''); , the next field would be automatically 4: 1 3 4 Is there a possibility to take

Re: AUTOINCREMENT / UNIQUE Behavior [Newbie Question]

2006-02-06 Thread Dan Nelson
In the last episode (Feb 06), David T. Ashley said: > I remember in MySQL that you can define an integer table field as > AUTOINCREMENT and UNIQUE (I might have the specific keywords wrong, > but everyone will know what I mean). > > In the life of a database where there are frequen

AUTOINCREMENT / UNIQUE Behavior [Newbie Question]

2006-02-06 Thread David T. Ashley
I remember in MySQL that you can define an integer table field as AUTOINCREMENT and UNIQUE (I might have the specific keywords wrong, but everyone will know what I mean). In the life of a database where there are frequent additions and deletions, 2^32 isn't that large of a number. Whe

Re: autoincrement for year

2005-12-28 Thread SGreen
quot;Salvatore Celsomino" <[EMAIL PROTECTED]> wrote: > > >Hi, > > >it is possible to create a field autoincrement for year. > > >example: > > >1/2005 > > >2/2005 > > >... > > >10500/2005 > > >new yea

Re: autoincrement for year

2005-12-28 Thread Gleb Paharenko
Hello. This should be possible with triggers. See: http://dev.mysql.com/doc/refman/5.0/en/triggers.html "Salvatore Celsomino" <[EMAIL PROTECTED]> wrote: >Hi, >it is possible to create a field autoincrement for year. >example: >1/2005 >2/

Re: autoincrement for year

2005-12-28 Thread Pooly
2005/12/28, Salvatore Celsomino <[EMAIL PROTECTED]>: > Hi, > it is possible to create a field autoincrement for year. > example: > 1/2005 > 2/2005 > ... > 10500/2005 > new year-- > 1/2006 > 2/2006 > > This could be of interes

autoincrement for year

2005-12-28 Thread Salvatore Celsomino
Hi, it is possible to create a field autoincrement for year. example: 1/2005 2/2005 ... 10500/2005 new year-- 1/2006 2/2006

Re: innoDB and autoincrement

2005-09-12 Thread Paul DuBois
alue present in the column with a value higher than the unused values, those values won't be reused. Does it mean that the autoincrement values of deleted records will be reused only if ALL records are deleted and then server restarted?? All records with values higher than the deleted r

Re: innoDB and autoincrement

2005-09-12 Thread Gleb Paharenko
Now when i restart my server, will these values of 5, 7 and 8 be > reused?? > > Does it mean that the autoincrement values of deleted records will be reused > only if ALL records are deleted and then server restarted?? > > From docs " Note that you may see ga

Re: innoDB and autoincrement

2005-09-12 Thread Michael Stassen
stay at 11 until the server is shutdown at which point it will revert to 1!!!"" Now if i have records 1 to 10 and i delete some records in between, say, 5, 7, 8. Now when i restart my server, will these values of 5, 7 and 8 be reused?? No. Does it mean that the autoincrement va

innoDB and autoincrement

2005-09-12 Thread priya . soma
er is shutdown at which point it will revert to 1!!!"" Now if i have records 1 to 10 and i delete some records in between , say, 5, 7, 8. Now when i restart my server, will these values of 5, 7 and 8 be reused?? Does it mean that the autoincrement values of deleted records will be

Re: Problem with autoincrement management

2005-08-22 Thread Thurgood Alex
Le samedi 20 août 2005 à 13:53 -0700, Devananda a écrit : Hi Devananda, > In short, it sounds like you should be able to simply copy the > auto_increment field data from your old DBMS into MySQL, and continue to > use it as such, without problem. Have you tried this in a test > environment yet

Re: Problem with autoincrement management

2005-08-20 Thread Devananda
lue fields in FMPro that didn't export well. However, the real problem that I have is that FMPro allows you to use multiple autoincrement fields in the same table. The mysql server I've migrated to is at version 4.0.23. The autoincrement fields were exported as text and are unfortunatel

Problem with autoincrement management

2005-08-20 Thread Thurgood Alex
hat didn't export well. However, the real problem that I have is that FMPro allows you to use multiple autoincrement fields in the same table. The mysql server I've migrated to is at version 4.0.23. The autoincrement fields were exported as text and are unfortunately not sequential (in ot

RE: How to specify autoincrement primary key value

2005-02-18 Thread Denis Gerasimov
nt to have _one and only_ root category)? > -Original Message- > From: Martijn Tonies [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 10, 2005 2:31 PM > To: Denis Gerasimov; [EMAIL PROTECTED]; 'MySQL General List' > Subject: Re: How to specify autoincrement pr

Re: How to specify autoincrement primary key value

2005-02-10 Thread Martijn Tonies
> > > One simple question... AFAIK I can specify value for an autoincrement > > > primary key (int) when inserting a record like this: > > > > > > INSERT INTO `tablename` (`id`, `name`) VALUES (1, 'test') > > > > > > But it do

RE: How to specify autoincrement primary key value

2005-02-10 Thread Denis Gerasimov
> > > > > Hello, > > > > One simple question... AFAIK I can specify value for an autoincrement > > primary key (int) when inserting a record like this: > > > > INSERT INTO `tablename` (`id`, `name`) VALUES (1, 'test') > > > > Bu

Re: How to specify autoincrement primary key value

2005-02-10 Thread Alec . Cawley
"Denis Gerasimov" <[EMAIL PROTECTED]> wrote on 10/02/2005 10:59:11: > > Hello, > > One simple question... AFAIK I can specify value for an autoincrement > primary key (int) when inserting a record like this: > > INSERT INTO `tablename` (`id`, `name`) VALUES

How to specify autoincrement primary key value

2005-02-10 Thread Denis Gerasimov
Hello, One simple question... AFAIK I can specify value for an autoincrement primary key (int) when inserting a record like this: INSERT INTO `tablename` (`id`, `name`) VALUES (1, 'test') But it doesn't work for id = 0. Why? I would like to use some primary key values for speci

RE: are autoincrement values not always increasing in innodb?

2004-12-28 Thread SciBit MySQL Team
quot;Frank Sonntag" <[EMAIL PROTECTED]> > To: "mysql@lists.mysql.com" > CC: > Subject: are autoincrement values not always increasing in innodb? > Sent: Mon, 27 Dec 2004 00:45:37 GMT > Received: Mon, 27 Dec 2004 00:49:46 GMT > Read: Tue, 28 Dec 2004 10:38:11

Re: are autoincrement values not always increasing in innodb?

2004-12-26 Thread Frank Sonntag
I am aware of that. But from my experience MySQL returns the the rows in the order that you inserted them. Assuming this is the case, I was wondering if the result I have seen means that the order of autoincrement values does not correspond to the order in which inserts are done. Frank On

are autoincrement values not always increasing in innodb?

2004-12-26 Thread Frank Sonntag
Hi, does InnoDB guarantee that the values of an autoincrement column do always increase? What happened to me is that a select * from my_table returns something like id | ... 10 11 5 12 13 where id is defined as int(10) unsigned NOT NULL auto_increment and is the primary key of the

RE: autoincrement question

2004-08-25 Thread Victor Pendleton
You will have to call the last_insert_id() function in order to obtain the autoincrement value. -Original Message- From: dan orlic To: [EMAIL PROTECTED] Sent: 8/25/04 2:26 PM Subject: autoincrement question question: I have an insert statement that has a null for the value of the

autoincrement question

2004-08-25 Thread dan orlic
question: I have an insert statement that has a null for the value of the primary key, id, since that value is also a auto-increment field. The problem i am running into is I need that Id further down the road for map tables, but I have no idea what the id is, since it is in fact, autoincremen

Re: Control Center autoincrement

2004-07-07 Thread Daniel Kasak
Paul Wallace wrote: Hello, May I specify a column to auto increment in the Control Center UI, either on or after creation? thanks Paul. Yes. In the table editor, there should be a 'notebook' ( multiple page thing ) down the bottom of the window. The first page is called 'field properties'.

Control Center autoincrement

2004-07-07 Thread Paul Wallace
Hello, May I specify a column to auto increment from within the Control Center UI, either on or after creation? thanks Paul.

Control Center autoincrement

2004-07-07 Thread Paul Wallace
Hello, May I specify a column to auto increment in the Control Center UI, either on or after creation? thanks Paul.

RE: autoincrement problem

2004-06-12 Thread Osvaldo Sommer
AM To: MySQL Mailing List Subject: autoincrement problem Hi all, What will be the best way to implement auto increment field. I dont want to use auto increment feature, as it only appends the numbers but doesn't check for the values deleted. Suppose, following are the values in table 1abc

Re: autoincrement problem

2004-06-12 Thread Nitin
MySQL Mailing List" <[EMAIL PROTECTED]> Sent: Saturday, June 12, 2004 3:53 PM Subject: Re: autoincrement problem > Nitin wrote: > > >Hi all, > > > >What will be the best way to implement auto increment field. I dont want to use auto increment feature, as it on

Re: autoincrement problem

2004-06-12 Thread Daniel Kasak
. 9xyz now if 2nd and 3rd rows are deleted, an autoincrement field will still assign 10, 11, 12 to the new values, while I want it to assign the values deleted from the table first. What will be the best way to implement it? Thanks in advance Nitin You shouldn't use text fields as pr

autoincrement problem

2004-06-12 Thread Nitin
ow if 2nd and 3rd rows are deleted, an autoincrement field will still assign 10, 11, 12 to the new values, while I want it to assign the values deleted from the table first. What will be the best way to implement it? Thanks in advance Nitin

RE: autoincrement column

2004-04-08 Thread Andrew Presley
#x27;Arthur Radulescu'" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> Subject: RE: autoincrement column Date: Thu, 8 Apr 2004 12:50:58 -0700 Try truncate table. It essentially drops the table and recreates it. -- DVP > -Original Message- > From: Arthur Radulescu [mail

RE: autoincrement column

2004-04-08 Thread Dathan Vance Pattishall
Try truncate table. It essentially drops the table and recreates it. -- DVP > -Original Message- > From: Arthur Radulescu [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 08, 2004 10:36 AM > To: [EMAIL PROTECTED] > Subject: autoincrement column > > Before switching

autoincrement column

2004-04-08 Thread Arthur Radulescu
Before switching to version 4.0.18 of MySQL the command "delete from table" was also reseting the autonincrement column value... It seems that this is not happening anymore after we have installed this version... Any idee about this problem? Is there any other way to reset this? Arthur -- MyS

Re: question on autoincrement

2004-04-01 Thread Victor Pendleton
14.5.3.1 SET Syntax. >From here: http://www.mysql.com/doc/en/ALTER_TABLE.html On Thu, 01 Apr 2004, Amit Wadhwa wrote: > > Hi All, > I was wondering if there was a way in mySQL wherein I tell the > autoincrement spec where to start from? > Eg. Autoincrement startfrom 1 >

RE: question on autoincrement

2004-04-01 Thread joe collins
http://www.mysql.com/doc/en/example-AUTO_INCREMENT.html this should sort you out.. Regards Joe -Original Message- From: Amit Wadhwa [mailto:[EMAIL PROTECTED] Sent: 01 April 2004 23:33 To: [EMAIL PROTECTED] Subject: question on autoincrement Hi All, I was wondering if there was a way in

question on autoincrement

2004-04-01 Thread Amit Wadhwa
Hi All, I was wondering if there was a way in mySQL wherein I tell the autoincrement spec where to start from? Eg. Autoincrement startfrom 1 And the values go in as: 10001..10002 and so on,.. instead of 1..2..3.. ..like sequencing in oracle… Any help is appreciated, Thanks Amit Wadhwa Data

Re: Reading securely the value of an autoincrement field used as PK

2004-01-20 Thread Balazs Rauznitz
On Tue, Jan 20, 2004 at 01:25:34PM +0100, Tobias Asplund wrote: > On Tue, 20 Jan 2004, Marco Paci wrote: > > > Since the process of inserting a new record and reading its PK field > > value is a two step process implemented by: > > 1) insert into tablename (columnnames) values() > > 2) select

Re: Reading securely the value of an autoincrement field used as PK

2004-01-20 Thread Balazs Rauznitz
On Tue, Jan 20, 2004 at 12:35:07PM +0100, Marco Paci wrote: > Environment OS:windows 2003 server, PLATFORM:.NET framework 1.1, > LANGUAGE:C#, .NET PROVIDER:MySQLDriverCS > > In an application I'm developing on top of mysql, I wanna use as primary > key for tables an autoincre

Re: Reading securely the value of an autoincrement field used as PK

2004-01-20 Thread Roger Baklund
* Tobias Asplund > On Tue, 20 Jan 2004, Marco Paci wrote: > > > Since the process of inserting a new record and reading its PK field > > value is a two step process implemented by: > > 1) insert into tablename (columnnames) values() > > 2) select last_insert_id() > > ,and since because of the a

Re: Reading securely the value of an autoincrement field used as PK

2004-01-20 Thread robert_rowe
Use a different connection for each thread. last_insert_id() is isolated per connection. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Reading securely the value of an autoincrement field used as PK

2004-01-20 Thread Tobias Asplund
On Tue, 20 Jan 2004, Marco Paci wrote: > Since the process of inserting a new record and reading its PK field > value is a two step process implemented by: > 1) insert into tablename (columnnames) values() > 2) select last_insert_id() > ,and since because of the architecture of my application

Reading securely the value of an autoincrement field used as PK

2004-01-20 Thread Marco Paci
Environment OS:windows 2003 server, PLATFORM:.NET framework 1.1, LANGUAGE:C#, .NET PROVIDER:MySQLDriverCS In an application I'm developing on top of mysql, I wanna use as primary key for tables an autoincrement field. Every time I insert a new record I need to read the value assigned to t

Autoincrement in MYISAM vs INNODB

2003-10-17 Thread Gordon
It is my understanding that at least through 4.0.14, INNODB does not support using autoincrement on the last field in a multi field primary key. i.e. if a table has a primary key of three fields like cpny_ID, acct_ID, list_ID in MYISAM you can add the autoincrement attribute to

Re: Fixing autoincrement

2003-08-14 Thread otherguy
On Tuesday, August 12, 2003, at 09:46 PM, Andrew Rothwell wrote: Hello List, I have a movies database, that I had an autoincrementing field for counting purposes.What I did though was remove some of the rows out of the table, now my table is reporting an incorrect number of movies listed.What I a

Fixing autoincrement

2003-08-14 Thread Andrew Rothwell
Hello List, I have a movies database, that I had an autoincrementing field for counting purposes.What I did though was remove some of the rows out of the table, now my table is reporting an incorrect number of movies listed.What I am trying to do is after is have done the following command Mysql>

Re: Fixing autoincrement

2003-08-14 Thread otherguy
On Tuesday, August 12, 2003, at 09:59 PM, otherguy wrote: On Tuesday, August 12, 2003, at 09:46 PM, Andrew Rothwell wrote: Hello List, I have a movies database, that I had an autoincrementing field for counting purposes.What I did though was remove some of the rows out of the table, now my tabl

Re: Autoincrement/last_insert_id race safe?

2003-03-26 Thread Ray
On Wednesday 26 March 2003 08:25, you wrote: > > A programmer just asked me about a possible race condition, > > and I didn't know what to answer: > > > > If I insert a line using autoincrement, then ask for last_insert_id() > > am I guaranteed to get the same I

Re: Autoincrement/last_insert_id race safe?

2003-03-26 Thread Alec . Cawley
> A programmer just asked me about a possible race condition, > and I didn't know what to answer: > If I insert a line using autoincrement, then ask for last_insert_id() > am I guaranteed to get the same ID I just inserted? Yes > It seems that another program could be ins

Re: Autoincrement/last_insert_id race safe?

2003-03-26 Thread Fred van Engen
Hi, On Wed, Mar 26, 2003 at 03:17:42PM +0100, Steve Rapaport wrote: > A programmer just asked me about a possible race condition, > and I didn't know what to answer: > > If I insert a line using autoincrement, then ask for last_insert_id() > am I guaranteed to get the sam

Autoincrement/last_insert_id race safe?

2003-03-26 Thread Steve Rapaport
A programmer just asked me about a possible race condition, and I didn't know what to answer: If I insert a line using autoincrement, then ask for last_insert_id() am I guaranteed to get the same ID I just inserted? It seems that another program could be inserting at almost the same time

Re: Importing into an AutoIncrement field

2003-03-21 Thread Paul DuBois
At 22:28 -0600 3/21/03, Paul DuBois wrote: At 20:04 -0800 3/21/03, Todd Cary wrote: I would like to avoid the necessity of specifying all of the fields - instead use the following syntax: INSERT INTO teachers VALUES (1,12345,NULL,'Harry','Smith','707-773-4523',2',... However, the first field is a

Re: Importing into an AutoIncrement field

2003-03-21 Thread Paul DuBois
At 20:04 -0800 3/21/03, Todd Cary wrote: I would like to avoid the necessity of specifying all of the fields - instead use the following syntax: INSERT INTO teachers VALUES (1,12345,NULL,'Harry','Smith','707-773-4523',2',... However, the first field is an autoincrementing field. Will MySQL ignor

Importing into an AutoIncrement field

2003-03-21 Thread Todd Cary
I would like to avoid the necessity of specifying all of the fields - instead use the following syntax: INSERT INTO teachers VALUES (1,12345,NULL,'Harry','Smith','707-773-4523',2',... However, the first field is an autoincrementing field. Will MySQL ignore my value and overwrite it with the "aut

Re: Autoincrement field rollover

2003-03-07 Thread Alec . Cawley
> The primary key (message_id)is a UNSIGNED BIGINT, > Which is supposed to be 64 bit, with autoincrement. > The each row is deleted as soon as it is fetched > By the client, and also after the expiry of a period > (~30 days). > 64 bits does provide a large number, but there

Re: Autoincrement field rollover

2003-03-06 Thread Paul DuBois
At 1:19 +0530 3/7/03, Jeethu Rao wrote: Hi, I'm using a mysql table to store small messages in a p2p messaging server. The primary key (message_id)is a UNSIGNED BIGINT, Which is supposed to be 64 bit, with autoincrement. The each row is deleted as soon as it is fetched By the client, and

Autoincrement field rollover

2003-03-06 Thread Jeethu Rao
Hi, I'm using a mysql table to store small messages in a p2p messaging server. The primary key (message_id)is a UNSIGNED BIGINT, Which is supposed to be 64 bit, with autoincrement. The each row is deleted as soon as it is fetched By the client, and also after the expiry of a period (~30

autoincrement field problem with BCB6

2003-02-06 Thread Kaspars Vilkens
Hallo list! I have an autoincrement field (+others of coarse) in myISAM table. When I try to insert values with queries everything works fine, but when I try to do it with Borland C++ builder 6's TSQLClientDataSet (dbExpress) it throws an exception that the field's value must be set. It

Re: Autoincrement : how does it work / how to reset it

2003-02-01 Thread Nasser Ossareh
Auto_Increment will increment the last_INSERT_ID (which in your case is 10)... so the num field of the new entry will be 11. --- Robert Mena <[EMAIL PROTECTED]> wrote: > Hi, I have been using autoincrement fields for some > time but was wondering how does it work in some > "

Re: Autoincrement : how does it work / how to reset it

2003-02-01 Thread Benjamin Pflugmann
Hi. On Fri 2003-01-31 at 06:48:45 -0800, [EMAIL PROTECTED] wrote: > Hi, I have been using autoincrement fields for some > time but was wondering how does it work in some > "special" situations. Most of this depends on which MySQL version you use and which table type, unfortuna

Re: Autoincrement : how does it work / how to reset it

2003-02-01 Thread Zak Greant
On Fri, Jan 31, 2003 at 06:48:45AM -0800, Robert Mena wrote: > Hi, I have been using autoincrement fields for some > time but was wondering how does it work in some > "special" situations. > > Ex. suppose I have an autoincrement field called num > and the last one ha

Re: Autoincrement : how does it work / how to reset it

2003-02-01 Thread Adolfo Bello
On Fri, 2003-01-31 at 10:48, Robert Mena wrote: > Hi, I have been using autoincrement fields for some > time but was wondering how does it work in some > "special" situations. > > Ex. suppose I have an autoincrement field called num > and the last one has value of 1

Autoincrement : how does it work / how to reset it

2003-01-31 Thread Robert Mena
Hi, I have been using autoincrement fields for some time but was wondering how does it work in some "special" situations. Ex. suppose I have an autoincrement field called num and the last one has value of 10. I delete the last on and insert a new one. Which value will it have ? 10 or

Re: InnoDB is losing records, there are gaps in autoincrement sequence

2003-01-24 Thread Heikki Tuuri
InnoDB is losing records, there are gaps in autoincrement sequence From: Robert Wunderer Date: 24 Jan 2003 12:53:04 +0100 Hi. - Original Message - > InnoDB appears to be losing records. > > The ve

Re: InnoDB is losing records, there are gaps in autoincrement sequence

2003-01-16 Thread Heikki Tuuri
Hi! - Original Message - From: "My Deja" <[EMAIL PROTECTED]> Newsgroups: mailing.database.mysql Sent: Thursday, January 16, 2003 12:39 PM Subject: InnoDB is losing records, there are gaps in autoincrement sequence > InnoDB appears to be losing records. > >

InnoDB losing records, gaps appearing in autoincrement sequence

2003-01-14 Thread My Deja
InnoDB appears to be losing records. The version I am using is 3.32.53 in Windows 2000. Gaps are appearing in the autoincrement sequence when the application does not permit record deletions. Records disappear although they have been retrieved for printing earlier. Does anyone know how this

Re: MySQL and Autoincrement

2002-12-01 Thread Heikki Tuuri
Stefan, - Original Message - From: ""Stefan Sturm"" <[EMAIL PROTECTED]> Newsgroups: mailing.database.mysql Sent: Sunday, December 01, 2002 1:49 PM Subject: MySQL and Autoincrement > Hello, > > when I use autoincrement on a field, now can I start the

Re: MySQL and Autoincrement

2002-12-01 Thread Benjamin Pflugmann
Hello. On Sun 2002-12-01 at 12:47:42 +0100, [EMAIL PROTECTED] wrote: > Hello, > > when I use autoincrement on a field, now can I start the count whith > 100? See http://www.mysql.com/doc/en/ALTER_TABLE.html (end of page) Bye, Benjamin. -- [EMA

MySQL and Autoincrement

2002-12-01 Thread Stefan Sturm
Hello, when I use autoincrement on a field, now can I start the count whith 100? Thank you, Stefan Sturm --- sql, query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http

Multi-Column Index with AutoIncrement

2002-08-15 Thread Matthew Walker
A month or two back I posted a question asking if an AutoIncrement column in a multicolumn index was supposed to work. At the time, I had accidently produced the intended effect, and couldn't duplicate it. Today, while browsing the MySQL docs, I discovered how to do it properly, and th

Re: Autoincrement question

2002-08-12 Thread Egor Egorov
Alec, Friday, August 09, 2002, 2:01:10 PM, you wrote: AC> If I insert a number, say X, of records using a single statement of the AC> form AC> INSERT INTO table VALUES (...), (...), ..., (...) AC> then retrieve the LAST_INSERT_ID, say Y, is it reasonable to assume that AC> the records will

Autoincrement question

2002-08-09 Thread Alec . Cawley
If I insert a number, say X, of records using a single statement of the form INSERT INTO table VALUES (...), (...), ..., (...) then retrieve the LAST_INSERT_ID, say Y, is it reasonable to assume that the records will be numbered contiguously from Y-X+1 to Y, even in a multi-user environment?

RE: Autoincrement in MultiColumn primary key?

2002-07-13 Thread Wouter van Vliet
Hmm, this all sounds indeed like a terrific feature .. if it would work ! So, I decided to try it and just see what'll happen. I did the following things: * first I created a table: mysql> create table autoIncrement ( -> id int(11) NOT NULL AUTO_INCREMENT, -> thingie v

Autoincrement in MultiColumn primary key?

2002-07-12 Thread Matthew Walker
filter: sql,query I did some tests recently on a two column primary key, one of which was an autoincrement column. It worked nicely, maintaining a separate increment for every unique value in the second column. I was ecstatic, as this was exactly what I need for some tables I'm desi

Re: primary key that doesn't autoincrement

2002-01-09 Thread Dan Nelson
In the last episode (Jan 09), D Woods said: > I'm a novice at setting up a mysql database and don't know the answer to > this. I usually set up my primary keys as autoincrementing ID fields. Now I > need to have a primary key that isn't an autoincrementing field as I want to > store the CFTOKEN an

RE: primary key that doesn't autoincrement

2002-01-09 Thread Rick Emery
yes, you can -Original Message- From: D Woods [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 4:02 PM To: [EMAIL PROTECTED] Subject: primary key that doesn't autoincrement I'm a novice at setting up a mysql database and don't know the answer to this. I us

primary key that doesn't autoincrement

2002-01-09 Thread D Woods
I'm a novice at setting up a mysql database and don't know the answer to this. I usually set up my primary keys as autoincrementing ID fields. Now I need to have a primary key that isn't an autoincrementing field as I want to store the CFTOKEN and use it as the primary key. Can I not have a non-au

Problem with the autoincrement

2001-12-04 Thread Rafael Santos García
I have a problem with the autoincrement. I have a table with a lot of registers, and the table have a field with auto_increment, but know this field don`t make the increment and always return to us the same number, one more big that the number that the autoincrement have to return. I have pass

Re: SupportWizard: bug in mysql: "ALTER TABLE CHANGE COLUMN A" can damage autoincrement column B!

2001-11-16 Thread Sinisa Milivojevic
Max writes: > >Description: > I am using russian values(cp1251 charset) for ENUM items. > Here is an example how to damage ID field by query to change > F_Category Enum. > >How-To-Repeat: > # Create tableA with ID field. > CREATE TABLE tableA ( > ID int(11) NOT NULL auto

SupportWizard: bug in mysql: "ALTER TABLE CHANGE COLUMN A" can damage autoincrement column B!

2001-11-15 Thread Max
Try to alter F_Category field ALTER TABLE tableA CHANGE COLUMN F_Category F_Category ENUM('Bug', 'tmp_sync_1005859699', 'Âîïðîñ ïîëüçîâàòåëÿ', 'Îáùèé âîïðîñ', 'Ðàñøèðåííûé çàïðîñ', 'Îøèáêà íà WEB ñåðâåðå', 'Îøèáêà ïîëüçîâàòåëÿ') N

RE: How to Get the New Number inserted in a AutoIncrement Field

2001-11-14 Thread Rick Emery
LAST_INSERT_ID() is what you need. -Original Message- From: ROGGER ALEXIS VASQUEZ MARTINEZ [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 4:45 PM To: [EMAIL PROTECTED] Subject: How to Get the New Number inserted in a AutoIncrement Field I know that this is a old question

Re: How to Get the New Number inserted in a AutoIncrement Field

2001-11-13 Thread Robert Alexander
http://www.mysql.com/doc/G/e/Getting_unique_ID.html HTH, /Rob >I know that this is a old question, but >I really need to know how can I get the >number that Mysql use in a autoincrement field >of a record I just inserted ... >Is there any function like LAST_INSERTED or >s

  1   2   >