Computer ghosts exists - they are called crackers! So things can happen
while you are sleeping :-)
As far as this problem is concerned, I would suggest a standard recipe
suited for debugging majority of the code when you are having weird
problems:
- do not believe your eyes or what you think is common sense
- question every line even you think you are 100% sure of what it is
doing
- make the program display all of its interemediate results
- try a simple test case that you can easily follow manually, without
the aid of a computer patiently repeating every instruction in your
program
- stop when your results differ from the output of your program
- look at the offending line and the problem will be obvious
"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
>
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail mysql-thread8483@stripped
>
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail mysql-unsubscribe@stripped instead.
--
Sasha Pachev
http://www.sashanet.com/ (home)
http://www.direct1.com/ (work)