first commit
This commit is contained in:
20
func_get_restplatz.php
Executable file
20
func_get_restplatz.php
Executable file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
#require_once("config.inc.php");
|
||||
|
||||
|
||||
function get_restplatz($tm_id){
|
||||
|
||||
$db = dbconnect();
|
||||
$query_ges_platz = $db->query("SELECT tm_plaetze FROM dvm_termine WHERE tm_id=$tm_id");
|
||||
$row_ges_platz = $query_ges_platz->fetch_array();
|
||||
|
||||
$query_verf_platz = $db->query("SELECT count(*) Anz FROM dvm_term_kand WHERE tm_id=$tm_id");
|
||||
$row_verf_platz = $query_verf_platz->fetch_array();
|
||||
|
||||
$restplatz = $row_ges_platz['tm_plaetze'] - $row_verf_platz['Anz'];
|
||||
return $restplatz;
|
||||
}
|
||||
|
||||
#echo get_restplatz(12);
|
||||
|
||||
?>
|
Reference in New Issue
Block a user