diff --git a/candidate.php b/candidate.php
index 6c81254..bf78c45 100644
--- a/candidate.php
+++ b/candidate.php
@@ -114,6 +114,7 @@
?>
@@ -211,6 +212,7 @@
$stmt_sample_wells = $pdo->prepare("
SELECT
sw.sample_id,
+ sw.name,
wp.Temperature,
wp.incubation_start,
wp.incubation_end,
@@ -257,7 +259,12 @@
c.candidate_id = ?
");
$stmt_sample_wells->execute([$_GET['id']]);
- $sample_wells = $stmt_sample_wells->fetchAll(PDO::FETCH_GROUP | PDO::FETCH_ASSOC);
+ $sample_wells_result = $stmt_sample_wells->fetchAll(PDO::FETCH_ASSOC);
+
+ $sample_wells = [];
+ foreach ($sample_wells_result as $row) {
+ $sample_wells[$row['sample_id']][] = $row;
+ }
if ($sample_wells && count($sample_wells) > 0):
?>
@@ -266,6 +273,7 @@
| Sample ID |
+ Name |
Composition |
Incubation |
PXRD Characterization |
@@ -280,6 +288,7 @@
?>
|
+ |
diff --git a/db/schema.sql b/db/schema.sql
index 9d2c1b3..f87a7d5 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -123,6 +123,7 @@ CREATE TABLE IF NOT EXISTS `Sample_Well` (
`well_plate_id` Int,
`sample_id` Int NOT NULL AUTO_INCREMENT,
`picture_url` text,
+ `name` text,
PRIMARY KEY (`sample_id`),
FOREIGN KEY (`well_plate_id`)
REFERENCES `Well_Plate`(`well_plate_id`)
|