On 2/28/06, Gustav Wiberg <[EMAIL PROTECTED]> wrote:
>
> Hi there guys!
>
> I have used a date-field and a time-field in a mysql-database.
>
>
>
>
> $sql = "UPDATE tbforum SET";
> $sql .= " question=" . safeQuote($frmQuestion);
> $sql .= ", insertDate='" . $dat . "'";
> $sql .= ", insertTime='" . time() . "'";
> $sql .= " WHERE IDForum=" . safeQuote($idForum);
> $querys = mysql_query($sql);



Use NOW() for both your date and time fields if the fields have been set up
as that. MySQL will then add the date and time according to whatever those
values are on your db machine.

Cheers
Matt

Reply via email to