"Christos J. Pontikis" wrote:
>
> Hello everybody,
>
> well, it seems not to be a big problem, but I cannot explain something
> happened.......
>
> I use a simple perl DBI script to insert values from WWW interface
>
> $vardate_ts=¤tdate_ts;
> $strOPERATION="Addnew record.";
> $strSQLaddnew="INSERT INTO $table_name ".
> "(food, calories, category, date_inserted) ".
> "VALUES ('$row_food', $row_calories, $row_category,'$vardate_ts')";
> ...............etc........................
>
> (sub currentdate_ts calculates current date)
>
> It was 00 09 26 in the morning and when as I was trying to insert a record,
> date_inserted field (type=timestamp) remained 00000000000000
>
> Today morning insert operates normally, as well as previous days... (!!!).
> No changes in the script (I was sleeping all night....)
>
> If you don't believe me, see it by yourself (food6, food7).......
>
> mysql> select * from calorimeter1 order by food limit 0,10;
>
> +-----+-------------------------------------+----------+----------+----------------+----------------+
> | id | food | calories | category | date_updated |
> date_inserted |
>
> +-----+-------------------------------------+----------+----------+----------------+----------------+
> | 465 | food1 | 1 | 1 | 19990727000926 |
> 00000000000000 |
> | 466 | food2á | 1 | 2 |
> 19990727110704 | 00000000000000 |
> | 464 | food3 | 1 | 1 | 19990727001856 |
> 19990726224343 |
> | 467 | food4 | 1 | 1 | 19990727002319 |
> 00000000000000 |
> | 468 | food5a | 1 | 1 | 19990727110547 |
> 00000000000000 |
> | 469 | food6 | 1 | 4 | 19990727112703 |
> 19990727112703 |
> | 470 | food7 | 1 | 1 | 19990727112937 |
> 19990727112937 |
>
> .......etc.......................................
>
> Regards
>
> Christos
> http://www.medisign.gr
Christos,
Post your OS (including kernel and compiler) and MySQL version. Problem
may be with your ¤tdate_ts. What is that value, and how does it
get assigned? If in a function, could it possibly have returned an
error, and that just set ¤tdate_ts = NULL?
Van
P.S. I wouldn't rule out ghosts, but, I don't know how interested
they'd be in computers.
--
=========================================================================
Linux rocks!!! http://www.dedserius.com
=========================================================================