map area for the management of a cemetery software with php/mysql

Viewed 38

I'm working on the development of a cemetery management software in php/mysql, so I have an image map created with html with coordinates retrieved from the database:

<img src="images\VA_cimetiere_recadrage.jpg" alt="Plan du cimetière de Velanne" usemap="#emplacement" class="map">
    <map name="emplacement">
        <?php foreach ($liste_concessions as $concession) {
            if ($concession['nom_concessionnaire'] == "") {?>
                <area class="tombeLibre" shape="rect" title="<?php echo $concession['num_concession'] . ": ". "LIBRE"; ?>" coords="<?php echo $concession['coords']; ?>" href="php/infoConcession.php?idTombe= <?php echo $concession['id_concessionnaire']?> ">
            <?php } else { ?>
                <area class="tombeOccupee" shape="rect" title="<?php echo $concession['num_concession'] . ": ". $concession['nom_concessionnaire']; ?>" coords="<?php echo $concession['coords']; ?>" href="php/infoConcession.php?idTombe=<?php echo $concession['id_concessionnaire']?> ">
            <?php } // end else
        } // end foreach ?>
    </map>

My database is composed of 3 tables: "plot", "concessionary" and a join table "owns":

Database illustration:

enter image description here

A concessionary may have one or more concessions, for example "john doe has concessions number 1 and 2", "jane doe has concessions number 29 - 30 - 31" and there are graves with no concessions.

Cemetery plan:

enter image description here

(blue ones are the occupied graves and the green ones are the empty graves) On the image the concessions "20 - 21 - 22" belongs to one person for example.

My problem is to know how to link the 3 concessions to the same person, knowing that on my image map, the concessions each have their own coordinates and I have not yet gathered them because I do not know how to do it.

I am told to use the join table to say that a concessionary has several concessions but I do not see how to do it.

0 Answers
Related