public function updateMovie(Request $request, $id)
{
$request->title;
$movie = DB::connection('mysql2')->select('UPDATE cb_video SET title='.$request->title.' WHERE videoid=' . $id);
return response()->json(['status' => 'success', 'data' => $movie]);
}
I am trying to update title in db but its throwing me error of
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an
error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near ‘WHERE
videoid=1449’ at line 1 (SQL: UPDATE cb_video SET title= WHERE
videoid=1449)
what can I do?