Bug #77906 [Opn->Fbk]: Update feature not working
| From: | peehaa@php.net | Date: | Tue, 16 Apr 2019 13:11:01 +0000 |
| Subject: | Bug #77906 [Opn->Fbk]: Update feature not working | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-220478@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77906&edit=1
ID: 77906
Updated by: peehaa@php.net
Reported by: lynnehorne at gmail dot com
Summary: Update feature not working
-Status: Open
+Status: Feedback
Type: Bug
Package: *General Issues
Operating System: Windows 10
PHP Version: 7.2.17
Block user comment: N
Private report: N
New Comment:
> I just get the message from my code that the database is not updated
What message? As it currently stands there is not nearly enough information for a bug report.
Previous Comments:
------------------------------------------------------------------------
[2019-04-16 13:02:30] lynnehorne at gmail dot com
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.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77906&edit=1