I’ve been puzzling over for 3 days and can’t get the following problem solved (it’s only about the button that represents the problem). I have the following relations or tables in the database: Link
This code is then used to query and convert the date:
<? php
$ servername = "";
$ username = "";
$ password = "";
$ dbname = "";
// Create connection
$ conn = new mysqli ($ servername, $ username, $ password, $ dbname);
// Check connection
if ($ conn-> connect_error) {
die ("Connection failed:". $ conn-> connect_error);
}
?>
<select>
<? php
$ sql = "SELECT FROM_UNIXTIME (date_from, '% Y-% m-% d% H:% i') as date_from
FROM mantis_plugin_Calendar_events_table AS mEV
INNER JOIN mantis_plugin_Calendar_relationship_table AS mRE ON mEV.id = mRE.event_id
INNER JOIN mantis_bug_table AS mTA ON mRE.bug_id = mTA.id
WHERE mTA.status = 10 ";
$ result = $ conn-> query ($ sql);
if ($ result-> num_rows> 0) {
// output data of each row
while ($ row = $ result-> fetch_assoc ()) {
echo "<option>". $ row ["date_from"]. "</option>";
}
} else {
echo "0 results";
}
$ conn-> close ();
?>
As you can see, only those data should be retrieved that have status 10 in the table “mantis_bug_table”. Now the user should select a date from the dropdown menu and confirm this with a button. By pressing the button, the status should be set from 10 to 50 and thus no longer be displayed (on the website).
In summary: I can’t get the code for the button
I hope one of you can help me
Best regards, Tim