php - MySQL Query debugging -


i have query creating table user , it's not executing in phpmyadmin of xampp.

here query,

     create table user (#user_id bigint unsigned primary key not null auto_increment,        email text not null,        phone text  primary key not null,        gcm_id bigint unsigned,        name text,        age_group text,        landmark text,        appartment text,        country text,        adults int,        kids int,        workstation text,        lati decimal(9,6),        longi decimal(9,6),        pincode text,        brand_id  bigint unsigned,        branch_id bigint unsigned,        app_money decimal(7,2),        member boolean,        checked_in boolean,         index user_table_index1(email(50), phone(20))         );  

it's showing

#1170 - blob/text column 'phone' used in key specification without key length. since text datatype ,why key length needed?  

what key length here means?

text datatype cannot used primary key need use varchar length instead.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -