-1

I want to update some fields of table users, but i get this error:

Fatal error: Call to a member function bind_param() on a non-object in C:\Users\fel\VertrigoServ\www\login\thumb.php on line 79

there is any syntax error in the code?

 $user=2;
    ($sql = $db -> prepare('UPDATE users SET (profile_photo, update_photo) VALUES (?, ?) where id_user=?'));

    $sql -> bind_param('ssi', $thumbnailPath, $thumbnailPathMin, $user); //line 79

    $sql -> execute();
Dharman
  • 30,962
  • 25
  • 85
  • 135
user455318
  • 3,280
  • 12
  • 41
  • 66
  • See the return value for `prepare`: http://php.net/manual/en/mysqli.prepare.php – Pekka May 26 '11 at 18:35
  • Does this answer your question? [Reference - What does this error mean in PHP?](https://stackoverflow.com/questions/12769982/reference-what-does-this-error-mean-in-php) – miken32 Nov 25 '19 at 03:14

1 Answers1

-1

SOLVED

($sql = $db -> prepare('UPDATE users SET profile_photo = ?, update_photo=?  where id_user=?'));
user455318
  • 3,280
  • 12
  • 41
  • 66
  • This does not provide any useful information; if the question will not be useful to future visitors it should be deleted instead of self-answered. – miken32 Dec 15 '15 at 00:26