Have you tried something like: $last_access=now(); $update_query = "UPDATE guestbook SET last_access='$last_access' WHERE guest_id='$guest_id'";
Otherwise... have you tried entering the query manually (e.g. with phpmyAdmin, etc.) using a relevant guest_id: UPDATE guestbook SET last_access='NOW()' WHERE guest_id='1' Robin "Jason Wong" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > On Monday 15 October 2001 19:35 pm, you wrote: > > > $update_query = "UPDATE guestbook SET last_access='NOW()' WHERE > > guest_id='$guest_id'"; <-----This thing refuses to play! > > > Can anyone, please, tell me why the above code doesn't do the update > > in the DB (mySQL)??? > > > try: NOW() without the quotes. > > $update_query = "UPDATE guestbook SET last_access=NOW() > WHERE guest_id='$guest_id'"; > > hth > -- > Jason Wong > Gremlins Associates > www.gremlins.com.hk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]