RE: [PHP-DB] Newbie Time Fields question
| From: | Cal Evans | Date: | Sat, 13 Jan 2001 19:06:50 +0000 |
| Subject: | RE: [PHP-DB] Newbie Time Fields question | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-5843@lists.php.net to get a copy of this message | ||
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:tim.wright@01network.com]
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:tim.wright@01network.com :::
::: 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: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net