Akpome Akpoguma [mailto:[EMAIL PROTECTED] wrote:
> 
> Hi Everyone,
> 
>   i did the following
> 
>   $dbh->prepare("UPDATE contentTable SET filename = '$dbfile date_modefied
> = 'CURRENT_DATE()' time_modefied = 'CURRENT_TIME() WHERE ext = '$ext' ")
> 
>   and the value of the current date and current time were not updated on
> the table. It seems perl interpolated the function CURRENT_DATE() and
> CURRENT_TIME() .....everything else is ok

Why did you put single quotes around the MySql function calls?  That tells
MySql that these are strings, not function calls.

Also, you should be using placeholders for the variables.  Try this:

$dbh->prepare('UPDATE contentTable SET filename = ?, date_modified =
CURRENT_DATE(), time_modified = CURRENT_TIME() WHERE ext = ?');

$dbh->execute($dbfile, $ext);


Ronald


Reply via email to