close

[Solved] General error: 1364 Field ‘user_id’ doesn’t have a default value

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error General error: 1364 Field ‘user_id’ doesn’t have a default value in php. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How General error: 1364 Field ‘user_id’ doesn’t have a default value Error Occurs?

Today I get the following error General error: 1364 Field ‘user_id’ doesn’t have a default value in php.

How To Solve General error: 1364 Field ‘user_id’ doesn’t have a default value Error ?

  1. How To Solve General error: 1364 Field 'user_id' doesn't have a default value Error ?

    To Solve General error: 1364 Field 'user_id' doesn't have a default value Error use print_r(Auth);
    then see in which format you have user_id / id variable and use it

  2. To Solve General error: 1364 Field 'user_id' doesn't have a default value Error

    To Solve General error: 1364 Field 'user_id' doesn't have a default value Error use print_r(Auth);
    then see in which format you have user_id / id variable and use it

Solution 1

you need to change database strict mode. for disable follow below step

  1. Open config/database.php
  2. find 'strict' change the value true to false and try again

Solution 2

use print_r(Auth);

then see in which format you have user_id / id variable and use it

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read

Leave a Comment