Have a situation where I need to show a US and Metric measurement on a web page. The spec in the database is in metric (meters). Of course I can use an equation in php to convert the units but it would be much better (I think?) to go ahead and convert the units in the mysql query.
I have a very VERY basic understanding of math in queries.
Maybe I can convert the meters to inches in the query and use php on the page to convert from inches to inches/feet or should I do it all in one swoop in the query?
Any guidance or push in the right direction would be very helpful.
This is being done with products specs so sometimes there will only be one product being queried and sometimes there will be a large list of them (50 max prolly) was thinking it would be easier and more efficient to maintain the calculation code in the query rather than having a php function.
Also this conversion method will be used to convert liters to gallons, cm’s to inches…etc The products spec lists have between 10 -15 specs that will all need to be converted on the fly.
Thanks in advance for any guidance or assistance you may be able to provide.