I am working on a PHP/MySQL solution to have a webpage where users can rate cigars. I ran into a problem though. One variable that exists is the length of the cigar. In the cigar world, the lengths are usually written like 6 1/8" or 155 mm or 4 15/16" or 125 mm. I don't want to make the length column in the database be a string with data like "6 1/8"" in it, because as the user submits cigars, different users could type it a different way, screwing up searches that are searching by length. I also want to have a real time metric conversion as well.
So my question is, how should I do this? Should I have a float column with the lengths as mm and it converts it to inches? If so, then how would I convert 155.57500mm to 6 1/8", or 155mm to 6 1/8". It's hard to explain, but I can't come up with a good solution. Please ask if you need clarification.
Any help is much appreciated!
Thanks! Karl
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php