Chorverwaltung
This commit is contained in:
@ -6,7 +6,7 @@ if ($function == 'titel')
|
||||
{
|
||||
if (isset($_POST["term"]))
|
||||
{
|
||||
$term = strtoupper(trim($_POST["term"]));
|
||||
$term = mb_strtoupper(trim($_POST["term"]));
|
||||
|
||||
$query = "SELECT distinct titel FROM jumi_noten_daten WHERE upper(titel) LIKE '%" . $term . "%'";
|
||||
$result = $db->query($query) or die("Cannot execute titel");
|
||||
@ -33,9 +33,9 @@ if ($function == 'verlag')
|
||||
{
|
||||
if (isset($_POST["term"]))
|
||||
{
|
||||
$term = strtoupper(trim($_POST["term"]));
|
||||
$term = mb_strtoupper(trim($_POST["term"]));
|
||||
|
||||
$query = "SELECT distinct verlag FROM jumi_noten_daten WHERE upper(verlag) LIKE '%" . $term . "%'";
|
||||
$query = "SELECT distinct bezeichnung FROM jumi_noten_verlag WHERE upper(bezeichnung) LIKE '%" . $term . "%'";
|
||||
$result = $db->query($query) or die("Cannot execute verlag");
|
||||
|
||||
if (mysqli_num_rows($result) > 0)
|
||||
@ -43,8 +43,35 @@ if ($function == 'verlag')
|
||||
while ($row = $result->fetch_array())
|
||||
{
|
||||
$output[] = array(
|
||||
"label" => $row['verlag'],
|
||||
"value" => $row['verlag']
|
||||
"label" => $row['bezeichnung'],
|
||||
"value" => $row['bezeichnung']
|
||||
);
|
||||
}
|
||||
#}else{
|
||||
# $output[] = array("label" => "keine Treffer");
|
||||
|
||||
}
|
||||
|
||||
echo json_encode($output);
|
||||
}
|
||||
}
|
||||
|
||||
if ($function == 'songbook')
|
||||
{
|
||||
if (isset($_POST["term"]))
|
||||
{
|
||||
$term = mb_strtoupper(trim($_POST["term"]));
|
||||
|
||||
$query = "SELECT distinct bezeichnung FROM jumi_noten_songbook WHERE upper(bezeichnung) LIKE '%" . $term . "%'";
|
||||
$result = $db->query($query) or die("Cannot execute verlag");
|
||||
|
||||
if (mysqli_num_rows($result) > 0)
|
||||
{
|
||||
while ($row = $result->fetch_array())
|
||||
{
|
||||
$output[] = array(
|
||||
"label" => $row['bezeichnung'],
|
||||
"value" => $row['bezeichnung']
|
||||
);
|
||||
}
|
||||
#}else{
|
||||
|
Reference in New Issue
Block a user