php - PDO Update not updating db -
i can't code update my, mysql database.
$sql = $odb -> prepare("update `lb` set `running` = `running` + 1 `url`= :url"); $sql -> execute(array(":url"=> $url )); may please help, have searched , couldn't find this.
don't :url in array, there no need it.
you can use question mark in place of =:url so:
url=? then in array, can either place direct value:
$sql->execute(array($url)); or can bind values incrementally:
$sql->bindvalue(1, $url, pdo::param_int); $sql->execute(); except, instead of using pdo::param_int, use own parameters...
so i'm guessing in instance use pdo::param_str
hopefully helps :)
Comments
Post a Comment