Talking under correction, but you'll be better of using a TIME column in
MySQL.  You can also do all the calculations with MySQL's build in time
functions already, which will save you allot of time, seeing that all the
calculations can be done via a single SQL query.

--
me


----- Original Message -----
From: "juaid" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 07, 2002 8:01 PM
Subject: [PHP] convertion from string to time & substracting


> Hi,
>
> sorry if maybe this is a bit dumb question, but I'm a begginer with php...
>
> I got a mysql database, where two of the fields of a table record times as
> CHAR(8) in the format hh:mm:ss
>
> I want to take this two times and get the difference between them in
> seconds, for example 12:01:30 - 12:00:00 = 90

That, is most definately not a 90 second difference, just so FYI...

> I looked up at the doc in the php.net website and couldn't get on how to
do
> this... should I use the strtotime function?
>
> anyone has donde something like this, or knows what functions could help
me
> to do this?
>
> Thanks in advance,
>
> juaid
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to