0

I have tried lot's of times and debugged but till now i can't find out where is the problem? Any kinds of help appreciated.

Error:

QueryException in Connection.php line 662: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'adjusted_amount' in 'field list' (SQL: update tbl_bill_collection set dueamount = 0, adjusted_amount = 100, adjusted_by = 5302, adjusted_date = 2016-12-20 21:19:31 where billno = 7777)

In My Controller Code:

        DB::table( 'bill_collection' )
        ->where( 'billno', 555 )
        ->update([
            'dueamount'     => $request->input( 'dueamount' ),
            'adjusted_amount' => $request->input( 'adjustment' ),
            'adjusted_by'   => Auth::User()->id,
            'adjusted_date' => date('Y-m-d H:i:s'),
        ]);

My database table column images given below:

enter image description here

RASEL RANA
  • 2,112
  • 1
  • 15
  • 17

1 Answers1

0

There are most likely invisible characters being the problem, like here: "Unknown column in 'field list'", but column does exist

Re-type the query by hand and see if that helps.

Community
  • 1
  • 1
diabetesjones
  • 838
  • 1
  • 7
  • 17