php - Invalid parameter number: parameter was not defined when insert data -


i got error when inserting data table (mysql) using pdo.
here code:

$stmt = $this->db->prepare('insert t_user (useremail, userpassword, userfirstname, userlastname, usersex, userphonenumbers, usernationalidcardno , userbirthday, useraddress, userdetails, userroles, userdecription) values (:useremail, :userpassword, :userfirstname, :userlastname, :usersex, :userphonenumbers , :usernationalidcardno, :userbirthday, :useraddress, :userdetails, :userroles, :userdecription)');         $stmt->bindvalue(':useremail', $entity->useremail);         $stmt->bindvalue(':userpassword', md5($entity->userpassword));         $stmt->bindvalue(':userfirstname', $entity->userfirstname);         $stmt->bindvalue(':userlastname', $entity->userlastname);         $stmt->bindvalue(':usersex', $entity->usersex);         $stmt->bindvalue(':userphonenumbers', json_encode($entity->userphonenumbers));         $stmt->bindvalue(':usernationalidcardno', $entity->usernationalidcardno);         $stmt->bindvalue(':userbirthday', $entity->userbirthday);         $stmt->bindvalue(':useraddress', $entity->useraddress);         $stmt->bindvalue(':userdetails', $entity->userdetails);         $stmt->bindvalue(':userroles', json_encode($entity->userroles));         $stmt->bindvalue(':userdescription', $entity->userdescription);         $result = $stmt->execute(); 

please me

you spelled :userdecription, in query, should :userdescription


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 -