Reputation: 2190
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
setdueamount
= 0,adjusted_amount
= 100,adjusted_by
= 5302,adjusted_date
= 2016-12-20 21:19:31 wherebillno
= 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:
Upvotes: 0
Views: 3062
Reputation: 838
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.
Upvotes: 0