Afzarul Islam
Afzarul Islam

Reputation: 1

I faced some problems. my code shows some error

SQLSTATE[23000]: Integrity constraint violation: 1048 Column >'category_description' cannot be null (SQL: insert into `tbl_category` (`category_id`, `category_name`, `category_description`, `publication_status`) >values (, sdfsf, , 1))

Upvotes: 0

Views: 54

Answers (2)

Ramesh Navi
Ramesh Navi

Reputation: 773

Your insert query is showing that you are not passing required values i.e.

insert into `tbl_category` (`category_id`, `category_name`, `category_description`, `publication_status`) >values (, sdfsf, , 1)

Assign a value to category_description or change the default value to 'NULL' in DB for that column.

Upvotes: 0

Dragon Kyn
Dragon Kyn

Reputation: 94

Your category_description cannot be null, update that column to "Allow NULL" or assign a value for that column.

Upvotes: 1

Related Questions