buli-punkte und hatgetippt hinzugefügt
This commit is contained in:
16
bulitipp/buli-punkte.php
Executable file
16
bulitipp/buli-punkte.php
Executable file
@@ -0,0 +1,16 @@
|
||||
|
||||
<?php
|
||||
$result=[];
|
||||
foreach (srowforeach("SELECT paarung, score1, score2 from `buli-results` where spieltag=?;", [$spieltag]) as $key => $value) {
|
||||
$id = $value[0];
|
||||
$score1 = $value[1];
|
||||
$score2 = $value[2];
|
||||
$tipp = getTipp($name, $spieltag, $id);
|
||||
$paarungQuery = srowforeach("SELECT heim, gast from `buli-paarungen` where id=?;", [$id])[0];
|
||||
$heim = $paarungQuery[0];
|
||||
$gast = $paarungQuery[1];
|
||||
$punkte = ps($name, $spieltag, $id);
|
||||
$result[]=["id"=>$id,"result"=>[$score1,$score2],"tipp"=>$tipp,"heim"=>$heim,"gast"=>$gast,"punkte"=>$punkte];
|
||||
}
|
||||
|
||||
echo json_encode($result, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE);
|
||||
Reference in New Issue
Block a user