Re: mysqli sql question
| From: | Richard Riley | Date: | Wed, 31 Aug 2011 14:17:56 +0000 |
| Subject: | Re: mysqli sql question | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-314678@lists.php.net to get a copy of this message | ||
"Jen Rasmussen" <jen@cetaceasound.com> writes:
> Peet,
>
> Could you do something like this instead? This is using named placeholders
> and a separate line for your statement
> but I was able to get it to echo the statement in this manner.
>
> $sql = "UPDATE table SET field1=:field1, field2=:field2 WHERE id=:id";
> $sth = $dbh->prepare($sql);
> $sth->execute(array(":field1"=>$field1,
> ": field2"=>$ field2,
> ": id"=>$id));
Hi Jen, could you point me to a document/man page for PHP which explains
that : notation in $sql= line please. I'm sure its common to everyone
here but, well, I never saw it before ;(