Re: PDO and UPDATE problem
| From: | Peter Lind | Date: | Wed, 21 Jul 2010 13:09:59 +0000 |
| Subject: | Re: PDO and UPDATE problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-307063@lists.php.net to get a copy of this message | ||
On 21 July 2010 15:04, Sky Gunning <sky.gunning@gmail.com> wrote:
> Hello
>
> I have a problem with a update using PDO.
> (learning atm and updating a php class to use PDO)
>
> private function updateUser($id)
> {
> $date = mktime();
>
> $DB = Db::getInstance();
>
> $stmt = $DB->prepare('"UPDATE '. TBL_USERS .' SET
> date_last_action=:updateDate WHERE id=:userId');
Try without the extra quotation mark before UPDATE.
Regards
Peter
--
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
BeWelcome/Couchsurfing: Fake51
Twitter: http://twitter.com/kafe15
</hype>