Page 1 of 1

update date

Posted: Wed May 21, 2003 9:04 am
by jamrop
I have a table

FIlm_id, Film_name, Date(date)

If i update a film, i want to be able to automically change the date to when i updated it, I have got this code, i know it is wrong. Any help plz

Code: Select all

<?php

$db =mysql_connect("localhost","jam", "");
mysql_select_db("ja",$db);

$sql = "UPDATE anime set 
Anime_id='$Anime_id', 
Anime_name='$Anime_name', 
Ep_Start='$Ep_Start', 
EP_End='$EP_End',
Language ='$Language', 
Complete ='$Complete', 
Discs ='$Discs', 
Formats='$Formats',
Quality = '$Quality', 
Catergory ='$Catergory', 
Total_Ep='$Total_Ep', 
Year_made='$Year_made',
Date=now())
where Anime_id = $Anime_id"; 


$rs=mysql_query($sql,$db)or die("Cannot query the database.<br>" . mysql_error());

?>

Posted: Wed May 21, 2003 9:20 am
by twigletmac
It's helpful if you post any error messages you receive.

Looks like you've got an extra closing parenthesis on this line:

Code: Select all

Date=now())
Mac