-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added subdistrict recommendations to the create and edit form for plot
Fixes #49
- Loading branch information
1 parent
5841689
commit d5a0f24
Showing
4 changed files
with
29 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
use Framework\Database\Database; | ||
use Framework\Database\QueryBuilder; | ||
|
||
$dataSet = Database::executeBuilder(QueryBuilder::new('plots')->select('DISTINCT subdistrict')->orderBy('subdistrict')); | ||
|
||
$subdistricts = []; | ||
if ($dataSet !== false) { | ||
while ($row = $dataSet->fetch_assoc()) { | ||
$subdistricts[] = $row['subdistrict']; | ||
} | ||
} | ||
|
||
?> | ||
|
||
<datalist id="subdistricts"> | ||
<?php foreach ($subdistricts as $subdistrict) { ?> | ||
<option value="<?= $subdistrict ?>"><?= $subdistrict ?></option> | ||
<?php } ?> | ||
</datalist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters