Re: Max 127 records

2002-04-19 Thread Richard Emery

Are you saying that you want a table with a maximum of 127 records ? Or,
that due to your TINYINT, you are RESTRICTED to 127 records?

If you are restricted to records, change TINYINT to INT.
If you want to have ONLY 128 records, change TINYINT to TINYINT UNSIGNED,
which will permit records 1 through 255.

FYI: show us your table structure next time; please don't force us to guess
your structure
- Original Message -
From: Henning Olsen <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 19, 2002 7:38 AM
Subject: Max 127 records


Hey - can anyone help?
I have a MySql-db in which I can only have 127 records.
Using phpmyadmin to insert record number 128 (autoincrement) gets this
message:

INSERT INTO `kontakt` (`id`, `navn`, `adresse`, `postnummer`, `by`,
`telefon`, `kommentar`) VALUES ('', 'fsd', 'sfdg', 'sg', 'fdsg', 'sfg',
'sg');

MySQL returnerede:

Duplicate entry '127' for key 1


No matter what table or desing of table - the result is the same. Using
other interfaces than phpmyadmin gives the same result too.

Thanks for helping

Henning



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Max 127 records

2002-04-19 Thread Egor Egorov

Henning,
Friday, April 19, 2002, 3:38:49 PM, you wrote:

HO> Hey - can anyone help?
HO> I have a MySql-db in which I can only have 127 records.
HO> Using phpmyadmin to insert record number 128 (autoincrement) gets this message:

HO> INSERT INTO `kontakt` (`id`, `navn`, `adresse`, `postnummer`, `by`, `telefon`, 
`kommentar`) VALUES ('', 'fsd', 'sfdg', 'sg', 'fdsg', 'sfg', 'sg');

HO> MySQL returnerede:

HO> Duplicate entry '127' for key 1
HO> No matter what table or desing of table - the result is the same. Using other 
interfaces than phpmyadmin gives the same result too.

What is the type of your 'id' column? Tinyint? If so, you should
change column type to increase the range. Look at:
   http://www.mysql.com/doc/C/o/Column_types.html

HO> Thanks for helping
HO> Henning





-- 
For technical support contracts, goto https://order.mysql.com/
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Max 127 records

2002-04-19 Thread Roger Baklund

* Henning Olsen
> I have a MySql-db in which I can only have 127 records.
> Using phpmyadmin to insert record number 128 (autoincrement) gets
> this message:
>
> INSERT INTO `kontakt` (`id`, `navn`, `adresse`, `postnummer`,
> `by`, `telefon`, `kommentar`) VALUES ('', 'fsd', 'sfdg', 'sg',
> 'fdsg', 'sfg', 'sg');
>
> MySQL returnerede:
>
> Duplicate entry '127' for key 1

This happens when the key is defined as a tinyint, a single byte datatype.
Change the column to a smallint (2 bytes), mediumint (3 bytes) or int (4
bytes):

ALTER TABLE kontakt MODIFY id INT UNSIGNED NOT NULL;

http://www.mysql.com/doc/A/L/ALTER_TABLE.html >

--
Roger


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Max 127 records

2002-04-19 Thread Ciprian Trofin

> A closed mouth maintains a happy mind.

It could be that you specified signed TINYINT as type for the PRIMARY
KEY. Signed TINYINT goes from -127 to 127, hence your problem.
HO> INSERT INTO `kontakt` (`id`, `navn`, `adresse`, `postnummer`, `by`,
HO> `telefon`, `kommentar`) VALUES ('', 'fsd', 'sfdg', 'sg', 'fdsg', 'sfg',
HO> 'sg');

HO> MySQL returnerede:

HO> Duplicate entry '127' for key 1


-- 
 Ciprian

> There is no such thing as an underestimate of average intelligence.  -- Henry Adams


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Max 127 records

2002-04-19 Thread Steve Buehler

WowI think I can finally help somebody on this list.
Ok.  I bet that you have your column set up as "tinyint".  I presume it 
would be the "id" column that you have.  "tinyint" is the following:
Signed values: -128 to 127
Unsigned values: 0 to 255

I ran into the problem before too.  So if you want to go past 127, you 
either need to set it as an Unsigned value, but that will only let you go 
to 255, or set it to another int.  smallint will go to 65535 (Unsigned), 
mediumint will go to 16777215 (Unsigned), etc.

Happy to finally be able to help. :)
Steve Buehler


At 07:38 AM 4/19/2002, Henning Olsen wrote:
>Hey - can anyone help?
>I have a MySql-db in which I can only have 127 records.
>Using phpmyadmin to insert record number 128 (autoincrement) gets this 
>message:
>
>INSERT INTO `kontakt` (`id`, `navn`, `adresse`, `postnummer`, `by`, 
>`telefon`, `kommentar`) VALUES ('', 'fsd', 'sfdg', 'sg', 'fdsg', 'sfg', 'sg');
>
>MySQL returnerede:
>
>Duplicate entry '127' for key 1
>
>
>No matter what table or desing of table - the result is the same. Using 
>other interfaces than phpmyadmin gives the same result too.
>
>Thanks for helping
>
>Henning
>
>
>
>-
>Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail <[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Max 127 records

2002-04-19 Thread Fred van Engen

Hi,

On Fri, Apr 19, 2002 at 01:38:49PM +0100, Henning Olsen wrote:
> Hey - can anyone help?
> I have a MySql-db in which I can only have 127 records.
> Using phpmyadmin to insert record number 128 (autoincrement) gets this message:
>
> INSERT INTO `kontakt` (`id`, `navn`, `adresse`, `postnummer`, `by`, `telefon`, 
>`kommentar`) VALUES ('', 'fsd', 'sfdg', 'sg',
+'fdsg', 'sfg', 'sg');
>
> MySQL returnerede:
>
> Duplicate entry '127' for key 1
>

Your table has an auto_increment column of type 'tiny int'. This allows
values between -128 and 127. You should choose a different column type.

Regards,

Fred.

-- 
Fred van Engen  XO Communications B.V.
email: [EMAIL PROTECTED] Televisieweg 2
tel: +31 36 5462400 1322 AC  Almere
fax: +31 36 5462424 The Netherlands

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




SV: Max 127 records

2002-04-19 Thread Carsten Gehling

> Fra: Henning Olsen [mailto:[EMAIL PROTECTED]]
> Sendt: 19. april 2002 14:39

> Hey - can anyone help?
> I have a MySql-db in which I can only have 127 records.
> Using phpmyadmin to insert record number 128 (autoincrement) gets
> this message:
>
> INSERT INTO `kontakt` (`id`, `navn`, `adresse`, `postnummer`,
> `by`, `telefon`, `kommentar`) VALUES ('', 'fsd', 'sfdg', 'sg',
> 'fdsg', 'sfg', 'sg');
>
> MySQL returnerede:
>
> Duplicate entry '127' for key 1

This is a classic :-)

You've created your primary key (the autoincremented field) as a TINYINT,
which only allows values in the range -128 to 127. auto_increment does not
support negative numbers, so when you've filled the first 127 records, it
cannot add any more values.

Alter the field to a INT UNSIGNED, then you're good to go

- Carsten



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Max 127 records

2002-04-19 Thread Henning Olsen

Hey - can anyone help?
I have a MySql-db in which I can only have 127 records.
Using phpmyadmin to insert record number 128 (autoincrement) gets this message:

INSERT INTO `kontakt` (`id`, `navn`, `adresse`, `postnummer`, `by`, `telefon`, 
`kommentar`) VALUES ('', 'fsd', 'sfdg', 'sg', 'fdsg', 'sfg', 'sg');

MySQL returnerede:

Duplicate entry '127' for key 1


No matter what table or desing of table - the result is the same. Using other 
interfaces than phpmyadmin gives the same result too.

Thanks for helping

Henning



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php