more edl work

This commit is contained in:
Sundog Jones 2024-09-17 09:03:49 -04:00
parent ab7d3a9c5a
commit 2365003114

View File

@ -9,9 +9,11 @@ $_REQUEST = json_decode($jsonBody, true);
if (isset($_REQUEST['media_id']) && $_REQUEST['media_id'] !== "") {
error_log(print_r($_REQUEST, true));
$id = intval($_REQUEST['media_id']);
$query = $db->prepare("SELECT * FROM media WHERE id = :id");
$query = $db->prepare("SELECT * FROM media m JOIN media_edls me ON m.id = me.media_id WHERE m.id = :id");
$query->bindValue(':id', $id);
$result = $query->execute();
$rows = $result->numRows();
error_log("EDL: found " . $rows . " rows for media id " . $_REQUEST['media_id']);
if ($result) {
// record exists