Jump to content

RuiMiguel

Members
  • Posts

    109
  • Joined

  • Last visited

Posts posted by RuiMiguel

  1. hello Nabel

    I have this error on the dashboard:

     

    Facade\Ignition\Exceptions\ViewException

    Undefined offset: 4 (View: xxxx/resources/views/layouts/default/dashboard/index.blade.php)

    line 896

     

    thanks

     

  2. i have this in profile main it works

     

    function getTotalScore()
    {
        $query = "SELECT SUM(`final_score`) AS score FROM ".TABLE_PREFIX."pireps WHERE pilotid = ".Auth::$userinfo->pilotid." AND accepted = 1";
        $result = DB::get_row($query);
        if (!$result) return 0;
        return ($result->score == '') ? 0 : $result->score;
    }

  3. yes I have a final score in the database on pireps

    this code is on the pilots_list

    Can you explain to me how I get the variable for $pilotid

    thanks

  4. Hello

    I need help for this code:

           <?php
           
    function getTotalScore()
    {
        $query = "SELECT SUM(`final_score`) AS final_score FROM ".TABLE_PREFIX."pireps WHERE pilotid = ".$pilotid." AND accepted = 1";
        $result = DB::get_row($query);
        if (!$result) return 0;
        return ($result->score == '') ? 0 : $result->score;
    }

    ?>

     

    <?php echo getTotalScore(); ?>

    the result is 0

    Can someone help me?

    Thanks

    Rui Miguel
     

     

     

×
×
  • Create New...