9
Bind variables in ADODB
Using bind variables with ADODB
//Update
$sql = $DB->Prepare('UPDATE mytable SET count = count + ? WHERE id = ?');
if($DB->Execute($sql,array("1",$id)) === false) {
print $DB->ErrorMsg();
}
//Insert
$sql = $DB->Prepare('INSERT INTO mytable (id, mytext) VALUES (?, ?)');
if($DB->Execute($sql,array($id,$text)) === false) {
print $DB->ErrorMsg();
}
rated 9 times
(9)
(0)
comments: 0 / hits: 2226
/ 4 years ago, tue, sep 6, 16, 10:11:38
More From
» PHP
Comments
There are no comments for this Snippet yet
Only authorized users can post. Please sign in first, or register a free account