php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77906 Update feature not working
Submitted: 2019-04-16 13:02 UTC Modified: 2019-04-16 19:03 UTC
From: lynnehorne at gmail dot com Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 7.2.17 OS: Windows 10
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2019-04-16 13:02 UTC] 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-04-16 13:11 UTC] peehaa@php.net
-Status: Open +Status: Feedback
 [2019-04-16 13:11 UTC] peehaa@php.net
> 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.
 [2019-04-16 19:03 UTC] peehaa@php.net
-Status: Feedback +Status: No Feedback
 [2019-04-16 19:03 UTC] peehaa@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Mar 03 22:01:27 2024 UTC