Git Product home page Git Product logo

Comments (7)

nabeelio avatar nabeelio commented on September 25, 2024

Where is this and from what function?

from phpvms_v2.

twincessna340a avatar twincessna340a commented on September 25, 2024

Totally forgot this was an addon....I'll move it back to the forums.

from phpvms_v2.

nabeelio avatar nabeelio commented on September 25, 2024

Well it could be getting data from a StatsData function, so could be an API issue, I will check it out too

from phpvms_v2.

twincessna340a avatar twincessna340a commented on September 25, 2024

Ok, it is from AFVA | Mitchell's Fleet Table Addon. I have the latest version (v2.0)

from phpvms_v2.

nabeelio avatar nabeelio commented on September 25, 2024

Do you know which function he is calling to set the $fleet variable? I don't have his code

from phpvms_v2.

twincessna340a avatar twincessna340a commented on September 25, 2024

$fleet = self::FleetInfo()

public static function FleetInfo()
{
$sql = 'SELECT a._, a.name AS aircraft,
COUNT(p.pirepid) AS routesflown,
SUM(p.distance) AS distance,
SEC_TO_TIME(SUM(p.flighttime_60*60)) AS totaltime,
AVG(p.distance) AS averagedistance,
AVG(p.flighttime) as averagetime
FROM '.TABLE_PREFIX.'aircraft a
LEFT OUTER JOIN '.TABLE_PREFIX.'pireps p ON (p.aircraft = a.id)
GROUP BY a.registration';

        return DB::get_results($sql);
        DB::debug();
        return $ret;

    }

from phpvms_v2.

twincessna340a avatar twincessna340a commented on September 25, 2024

Changed
"SEC_TO_TIME(SUM(p.flighttime_60_60))"
to
"SEC_TO_TIME(SUM(TIME_TO_SEC(p.flighttime_stamp)))" as currently coded in StatsData (beta 152) and it works 100%.

from phpvms_v2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.