Add occurences Count to best recordings
This commit is contained in:
+5
-3
@@ -92,7 +92,7 @@ if (get_included_files()[0] === __FILE__) {
|
||||
<table>
|
||||
<?php
|
||||
$birds = array();
|
||||
$confidence = array();
|
||||
$values = array();
|
||||
|
||||
while($results=$result2->fetchArray(SQLITE3_ASSOC))
|
||||
{
|
||||
@@ -101,7 +101,9 @@ if (get_included_files()[0] === __FILE__) {
|
||||
$filename = "/By_Date/".$results['Date']."/".$comname."/".$results['File_Name'];
|
||||
$birds[] = $results['Com_Name'];
|
||||
if ($_GET['sort'] == "confidence") {
|
||||
$confidence[] = ' (' . round($results['MAX(Confidence)'] * 100) . '%)';
|
||||
$values[] = ' (' . round($results['MAX(Confidence)'] * 100) . '%)';
|
||||
} elseif ($_GET['sort'] == "occurrences") {
|
||||
$values[] = ' (' . $results['COUNT(*)'] . ')';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +123,7 @@ if (get_included_files()[0] === __FILE__) {
|
||||
if ($index < count($birds)) {
|
||||
?>
|
||||
<td>
|
||||
<button type="submit" name="species" value="<?php echo $birds[$index];?>"><?php echo $birds[$index].$confidence[$index];?></button>
|
||||
<button type="submit" name="species" value="<?php echo $birds[$index];?>"><?php echo $birds[$index].$values[$index];?></button>
|
||||
</td>
|
||||
<?php
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user