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

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -