Skip to content

Commit

Permalink
Fix sql query building for search
Browse files Browse the repository at this point in the history
  • Loading branch information
morrigan committed Jul 22, 2024
1 parent 00d8f2e commit 13d8057
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions page-excursions.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@
if (!empty($_GET['godina'])) {
$where[] = "rem.endtime > '".$_GET['godina']."-01-01'";
if ($_GET['godina'] == date("Y")) {
$where = "rem.starttime < ".date("'Y-m-d'");
$where[] = "rem.starttime < ".date("'Y-m-d'");
} else {
$where[] = "rem.starttime < '".$_GET['godina']."-12-31'";
}
} else {
$where = "rem.endtime < ".date("'Y-m-d'");
$where[] = "rem.endtime < ".date("'Y-m-d'");
}
if (!empty($_GET['naziv'])) {
$where[] = "p.post_title LIKE '%".$_GET['naziv']."%'";
Expand Down

0 comments on commit 13d8057

Please sign in to comment.