$sql = "INSERT INTO `rss_vesti` SET `SAJT_ID` = '$rss_izvor_id', `NASLOV` = '$title1', `SLIKA` = '$image2', `SADRZAJ` = '$descritpion_trim1', `IZVOR` = '$link1', `DATUM` = 'CURDATE()'"; mysql_query($sql)or die(mysql_error());wer is the probelm?
date time value
-
- Posts: 28
- Joined: Wed Jun 08, 2011 10:31 am
date time value
i try tu insert current date and time, but, value inserted in table is 0000-00-00 00:00:00 all the time
-
- Posts: 28
- Joined: Wed Jun 08, 2011 10:31 am
Re: date time value
Solved
$datum = date('Y-m-d Hs');
$datum = date('Y-m-d Hs');
Re: date time value
you could also use the mysql NOW() function in place of the CURDATE() one you have above.