How can i get data from using date range for querying multiple details from a table?

后端 未结 5 1293
北海茫月
北海茫月 2021-01-23 08:12

I\'ve been able to get multiple details from this table, using the codes beneath the table...

I know the table looks odd, but that\'s the available data table from the cl

5条回答
  •  醉酒成梦
    2021-01-23 08:43

    You are doing

    if ($result = $db->query($query)) {
        $finalScore1 = 0;
       ......
    }
    
    if ($result = $db->query($query)) {
       $finalScore2 = 0;
       .......
    }
    
    
    echo ($finalscore +$finalscore2);
    

    Try to do:

    $finalScore1 = 0;
    if ($result = $db->query($query)) {
       ......
    }
    
    $finalScore2 = 0;
    if ($result = $db->query($query)) {
       .......
    }
    
    
    echo ($finalscore +$finalscore2);
    

    You have also not defined, define on the top of all:

    $place_map = ['first' => 1, 'second' => 0.8, 'third' => 0.4];
    

    Hope these resolve you error, rest result as per data and code

提交回复
热议问题