|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-04-16 13:11 UTC] peehaa@php.net
-Status: Open
+Status: Feedback
[2019-04-16 13:11 UTC] peehaa@php.net
[2019-04-16 19:03 UTC] peehaa@php.net
-Status: Feedback
+Status: No Feedback
[2019-04-16 19:03 UTC] peehaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 15:00:01 2025 UTC |
Description: ------------ I am running on Windows 10 with MySQL Community Server edition and PHP 7.3.3 using Xampp Apache. I have also rolled back to PHP 7.3.2 and 7.2, without success. When I run the code to update any of the information from my tables, I don't get any error message in the browser (Firefox, Chrome and Explorer) but the database does not update. Test script: --------------- function update(){ $query = "UPDATE " . $this->table_name . " SET city = :city, provinceid = :provinceid, countryid = :countryid WHERE id = :id"; $stmt = $this->conn->prepare($query); // posted values $this->city=htmlspecialchars(strip_tags($this->city)); $this->provinceid=htmlspecialchars(strip_tags($this->provinceid)); $this->countryid=htmlspecialchars(strip_tags($this->countryid)); $this->id=htmlspecialchars(strip_tags($this->id)); // bind parameters $stmt->bindParam(':city', $this->city); $stmt->bindParam(':provinceid', $this->provinceid); $stmt->bindParam(':countryid', $this->country_d); $stmt->bindParam(':id', $this->id); // execute the query if($stmt->execute()){ return true; } return false; } Expected result: ---------------- I expect to see that the data in my database has updated with the changes. Actual result: -------------- Nothing happens. I just get the message from my code that the database is not updated.