php - SQLSTATE[42000]: Syntax error or access violation : -


  • sqlstate[42000]: syntax error or access violation: 1064 have error in sql syntax; check manual corresponds mysql server version right syntax use near '1 not null, default_value varchar(255), is_encrypted tinyint(1) not null, is_met' @ line 1.

failing query:

"create table ohrm_display_field (report_group_id bigint not null, name varchar(255) not null, label varchar(255) not null, field_alias varchar(255), is_sortable varchar(10) not null, sort_order varchar(255), sort_field varchar(255), element_type varchar(255) not null, element_property text not null, width varchar(255) not null, is_exportable varchar(10), text_alignment_style varchar(20), is_value_list tinyint(1) not null, display_field_group_id 1 not null, default_value varchar(255), is_encrypted tinyint(1) not null, is_meta tinyint(1) default '0' not null, display_field_id bigint auto_increment, primary key(display_field_id)) engine = innodb"

[solved]

next error:

  • sqlstate[42000]: syntax error or access violation: 1064 have error in sql syntax; check manual corresponds mysql server version right syntax use near ' primary key(id)) engine = innodb' @ line 1.

    failing query:

    "create table ohrm_job_interview_attachment (id bigint, interview_id bigint, file_name varchar(255), file_type varchar(255), file_size bigint, file_content longblob, attachment_type int, comment , primary key(id)) engine = innodb"

can suggest what's error in indicated query? effective guidance highly appreciated.

the issue here

display_field_group_id 1 not null,  

you need assign data type if tinyint following should work

create table ohrm_display_field  ( report_group_id bigint not null,  name varchar(255) not null,  label varchar(255) not null,  field_alias varchar(255),  is_sortable varchar(10) not null,  sort_order varchar(255),  sort_field varchar(255),  element_type varchar(255) not null,  element_property text not null,  width varchar(255) not null,  is_exportable varchar(10),  text_alignment_style varchar(20),  is_value_list tinyint(1) not null,  display_field_group_id tinyint(1) not null,  default_value varchar(255),  is_encrypted tinyint(1) not null,  is_meta tinyint(1) default '0' not null, display_field_id bigint auto_increment,  primary key(display_field_id) ) engine = innodb  

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -