mysql - Error in PHP PDO Prepared Statement -


try  {      $stmt = $conn->prepare(" update site_users set users_first_name = :users_first_name, users_last_name = users_last_name     ,users_email_verified = :users_email_verified , users_password = :users_password, users_dob_day = :users_dob_day, users_dob_month = :users_dob_month     ,users_dob_year = :users_dob_year, users_password_1 = :users_password_1, users_registration_time= :users_registration_time      users_email = :users_email");      $stmt->bindparam(':users_first_name', $_post["firstname"] , pdo::param_str);     $stmt->bindparam(':users_last_name', $_post["lastname"]  , pdo::param_str);     $stmt->bindparam(':users_email', $_post["email"] , pdo::param_str);     $stmt->bindparam(':users_password', $hashed_password , pdo::param_str);     $stmt->bindparam(':users_password_1', $_post["password"] , pdo::param_str);     $stmt->bindparam(':users_email_verified', $users_email_verified , pdo::param_str);     $stmt->bindparam(':users_dob_day', $_post["day"], pdo::param_str);     $stmt->bindparam(':users_dob_month', $_post["month"], pdo::param_str);     $stmt->bindparam(':users_dob_year', $_post["year"], pdo::param_str);     $stmt->bindparam(':users_registration_time',$date, pdo::param_str);      $stmt->execute();  }  catch(pdoexception $e)  {         echo "error: " . $e->getmessage(); } 

this error, code echo

error: sqlstate[hy093]: invalid parameter number: number of bound variables not match number of tokens

where problem in code?

i think missing : in users_last_name = users_last_name query

probably has users_last_name = :users_last_name


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -