You are here: Re: Is this a quirk, or a bug, or am I just retarded somehow? « All PHP « IT news, forums, messages
Re: Is this a quirk, or a bug, or am I just retarded somehow?

Posted by J.O. Aho on 09/28/53 11:42

Michael Trausch wrote:
> Hello,
>
> I've been searching around, but I'm probably not using the right
> keywords or something... I'm trying to work with something that is in a
> database and has a column (well, two) that hold UNIX time stamps. The
> problem seems to be though, that when I try to use the timestamp as an
> integer, it turns to 0. From debugging output that I put into the
> application:
>
> 0 is snooze till time.
> Array
> (
> [tid] => 12
> [takesPlace] => 1142411580
> [title] => asdfasdf
> [snooze_until] => 1142474505
> )
>
> takesPlace and snooze_until are columns that hold UNIX timestamps. But
> when I try to use it as a number, it becomes 0 (as you can see in the
> first line of output).

Would guess you don't access the value in the right way
Tried

echo $array_name['takesPlace'];

or

echo $array_name[1];


If you are using $array_name[takesPlace], you can get a random result.



//Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация