RE: [PHP-DB] Newbie Time Fields question

2001-01-13 Thread Cal Evans

IMHO,(And I'm sure there are those on this list that would disagree with
me.)

Store the time of each track in seconds in the database. (i.e. an int,
instead of 2:37 it would be 157) then convert to minutes and second for
display.

Cal
http://www.calevans.com

-Original Message-
From: Timothy Wright [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 13, 2001 12:46 PM
To: PHP-Db List
Subject: [PHP-DB] Newbie Time Fields question


Hello all -

I have created a database in Access 97 which will soon be converted to MySQL
for web use.  It is a music catalog with tracks of each CD listed with
times.  My question is: what is the best data type for the track times
(2:37, 6:24, etc.) which will allow me to add all the tracks of a CD and
come up with a total CD time (65 minutes and 59 seconds, for example).
Right now I am using the "short time" format in Access which only allows
times up to 23:59 (I guess it's actually designed for hours/minutes) and I
haven't figured out how to add the values.  Is there a data type that will
work in Access, and/or what would be the equivalent format in MySQL??
 Also - does anyone have an example of a PHP/MySQL solution for a music
database??

Thanks in advance,

Tim Wright

:::
::: :::
:::   Timothy Wright:::
:::   mailto:[EMAIL PROTECTED]   :::
:::   Digital Network Enterprises   :::
:::   http://www.01network.com  :::
::: :::
:::   secure e-mail by request  :::
:::   (PGP signature and/or encryption) :::
:::


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Newbie Time Fields question

2001-01-13 Thread Timothy Wright

Hello all -

I have created a database in Access 97 which will soon be converted to MySQL
for web use.  It is a music catalog with tracks of each CD listed with
times.  My question is: what is the best data type for the track times
(2:37, 6:24, etc.) which will allow me to add all the tracks of a CD and
come up with a total CD time (65 minutes and 59 seconds, for example).
Right now I am using the "short time" format in Access which only allows
times up to 23:59 (I guess it's actually designed for hours/minutes) and I
haven't figured out how to add the values.  Is there a data type that will
work in Access, and/or what would be the equivalent format in MySQL??
 Also - does anyone have an example of a PHP/MySQL solution for a music
database??

Thanks in advance,

Tim Wright

:::
::: :::
:::   Timothy Wright:::
:::   mailto:[EMAIL PROTECTED]   :::
:::   Digital Network Enterprises   :::
:::   http://www.01network.com  :::
::: :::
:::   secure e-mail by request  :::
:::   (PGP signature and/or encryption) :::
:::


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]