- Usage of materialize css framework
- outsourcing functions to new lib/api.php
This commit is contained in:
@@ -117,10 +117,16 @@ return dbQuery($dbConnection, $query, $params);
|
||||
|
||||
function giveJudokasAttendence($dbConnection, $date, $ids){
|
||||
$values = array();
|
||||
foreach( $ids as $id){
|
||||
array_push( $values, "(\"".$date."\", ".$id.")");;
|
||||
try{
|
||||
foreach( $ids as $id){
|
||||
array_push( $values, "(\"".$date."\", ".$id.")");;
|
||||
}
|
||||
$query = "INSERT INTO `cwsvjudo`.`anwesenheit` (`date`, `userId`) VALUES ".join(",", $values).";";
|
||||
dbQuery($dbConnection, $query, array(), ['dontFetch' => true]);
|
||||
}
|
||||
catch(PDOException $db_error){
|
||||
print "Error!: " . $db_error->getMessage() . "<br/>";
|
||||
return null;
|
||||
}
|
||||
$query = "INSERT INTO `cwsvjudo`.`anwesenheit` (`date`, `userId`) VALUES ".join(",", $values).";";
|
||||
dbQuery($dbConnection, $query, array(), ['dontFetch' => true]);
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user