James Maltby
James Maltby

Reputation: 127

This is not a number error in phpMyAdmin

I am trying to create a user table this way:

Table creation

But I am getting this error:

This is not a number

What am I doing wrong?

Upvotes: 10

Views: 18178

Answers (3)

naseer mohammad
naseer mohammad

Reputation: 281

You need to provide the VARCHAR length (the number of characters). The length should be a numeric value. then you can get rid of the error.

Upvotes: 9

jrd1
jrd1

Reputation: 10716

You're trying to create a primary key that can store an integer of length 40.

Consult this table:

Type | Use | Size

  • TINYINT | A very small integer | The signed range is –128 to 127. The unsigned range is 0 to 255.
  • SMALLINT | A small integer | The signed range is –32768 to 32767. The unsigned range is 0 to 65535.
  • MEDIUMINT | A medium-size integer | The signed range is –8388608 to 8388607. The unsigned range is 0 to 16777215
  • INT or INTEGER | A normal-size integer | The signed range is –2147483648 to 2147483647. The unsigned range is 0 to 4294967295
  • BIGINT | A large integer | The signed range is –9223372036854775808 to 9223372036854775807. The unsigned range is 0 to 18446744073709551615

As a result, PhpMyAdmin won't create the field as it exceeds the maximum allowed length for that type (INT).

http://help.scibit.com/mascon/masconMySQL_Field_Types.html

Upvotes: 4

devang jogiya
devang jogiya

Reputation: 234

INT type have 4 bytes storage capacity so you can only give max lenght of 11.

Check this for more details

Upvotes: 4

Related Questions