first commit
This commit is contained in:
21
func_get_lfd_haushalt.php
Normal file
21
func_get_lfd_haushalt.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
#require_once("config.inc.php");
|
||||
|
||||
|
||||
function get_lfd_haushalt($tid){
|
||||
|
||||
$db = dbconnect();
|
||||
$query_get_lfd_haushalt = $db->query("SELECT max(lfd_haushalt)+1 lfd_hhnr FROM gd_buchung WHERE tid=$tid");
|
||||
$row_get_lfd_haushalt = $query_get_lfd_haushalt->fetch_array();
|
||||
if($row_get_lfd_haushalt['lfd_hhnr']==''){
|
||||
$next = 1;
|
||||
}else{
|
||||
$next = $row_get_lfd_haushalt['lfd_hhnr'];
|
||||
}
|
||||
return $next;
|
||||
}
|
||||
|
||||
#echo get_lfd_haushalt(4);
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user