php - PDO: UPDATE not working -


i wrote code update mysql table via php/pdo. not working , can't figure out mistake is.
execute() returns true, changes never show in table.

my code looks pretty this:

$columnobject = array(     "emailaddress"=>"aaa@aaa.com",     "passwordhash"=>"56bj5g63j4g57g567g5k75jh7gk4g74j5hg67",     "name"=>"qweqweqwe",     "lastactivity"=>4128649814 ); $knowncolumnname = "emailaddress"; $knowncolumndata = "aaa@aaa.com";  foreach ($columnobject $columnname => $columndata) {     $pdoupdatestring .= $columnname . "=:" . $columnname . ",";     $pdoexecuteobject[$columnname] = $columndata; } $pdoupdatestring = rtrim($pdoupdatestring, ",");  $pdoexecuteobject['knowncolumn'] = $knowncolumndata; $q = $this->hcon->prepare('update ' . $this->name . ' set ' . $pdoupdatestring . ' ' . $knowncolumnname . '=:knowncolumn'); $q->execute($pdoexecuteobject); 


Comments

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -