Announcement

Collapse
No announcement yet.

Looking for some MySQL Code (Altitude to FL)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mt007
    replied
    Originally posted by nzradar View Post
    Thanks for the heads up on the PHP code, it may be a solution. I've currently got MySQL code:

    Code:
     left(round(max(altitude)/100,0),3)
    Hi Michael,
    how can i make for me some page like yours?

    Thanks very much.
    Regards,
    Last edited by Oblivian; 2016-03-31, 18:11.

    Leave a comment:


  • Oblivian
    replied
    Yeah shortly after finding the PHP ver I noted a SQL ver of round. But wasn't sure how to impliment with our standard tables as such to get a new array field to play with

    Leave a comment:


  • nzradar
    replied
    Thanks for the heads up on the PHP code, it may be a solution. I've currently got MySQL code:

    Code:
     left(round(max(altitude)/100,0),3)

    Leave a comment:


  • Oblivian
    replied
    It may only help if you using basic PHP to display the outputs like me..

    I just put in another column in mine to test, with the native PHP round function used to get a result. Which you could then concant also. By default it rounds to halves but there are other parameters

    ".Round($rows['altitude'],-3)."

    Ends in result:

    FLtest.jpg

    Leave a comment:


  • nzradar
    started a topic Looking for some MySQL Code (Altitude to FL)

    Looking for some MySQL Code (Altitude to FL)

    Hi, with a percent chance of the low teens I'm looking for a way in MySQL code to report flight level from altitude. For the best part:

    concat("FL",left(altitude,3)) gets me what I need but when the altitude is reported as 40950 I'm really looking to round up to 41000 but can't seem to find a function for rounding up integer values.

    I'd appreciate any help, thanks.
Working...
X