Made changes but still in debugging mode

one of the error is Trying to get property of non-object in
C:\xampp\htdocs\frs\search.php on line 82 which is usually because of an
invalid sql syntax