From 01ec497f9f1264efe58eea65919b835b1fcd5c7f Mon Sep 17 00:00:00 2001 From: Ken Fallon Date: Sat, 26 Sep 2026 15:40:28 +0200 Subject: [PATCH] Support last update date #20 --- cms/add_show_json.php | 4 ++-- cms/comment_process.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cms/add_show_json.php b/cms/add_show_json.php index 6ff1144..e56d02a 100644 --- a/cms/add_show_json.php +++ b/cms/add_show_json.php @@ -538,7 +538,7 @@ $summary = mysqli_real_escape_string( $connection, $summary ); $notes = mysqli_real_escape_string( $connection, $notes ); $tags = mysqli_real_escape_string( $connection, $tags ); -$query_add = "INSERT INTO eps VALUES ('$ep_num', '{$ep_date}', '{$title}', '{$duration}', '{$summary}', '{$notes}', '{$host_id}', '{$series_id}', '{$explicit}', '{$episode_license}', '{$tags}', '0', '0', '0')"; +$query_add = "INSERT INTO eps (id,date,title,duration,summary,notes,hostid,series,explicit,license,tags) VALUES ('$ep_num', '{$ep_date}', '{$title}', '{$duration}', '{$summary}', '{$notes}', '{$host_id}', '{$series_id}', '{$explicit}', '{$episode_license}', '{$tags}')"; logextra( "About to add to db" ); @@ -567,7 +567,7 @@ if (mysqli_errno( $connection )) { problem("MySQL error- The show $ep_num was not added to the eps db.\n$error"); } -$result = mysqli_query($connection, "UPDATE reservations SET `status` = 'SHOW_POSTED' WHERE `ep_num` = '$ep_num' AND status='SHOW_SUBMITTED'; UPDATE last_update SET last_udate_timestamp = CURRENT_TIMESTAMP;" ); +$result = mysqli_query($connection, "UPDATE reservations SET `status` = 'SHOW_POSTED' WHERE `ep_num` = '$ep_num' AND status='SHOW_SUBMITTED';" ); if (!isset($result)) { problem("DB problem - The show $ep_num has not been added to the eps db"); } diff --git a/cms/comment_process.php b/cms/comment_process.php index 7f863cd..82fea05 100755 --- a/cms/comment_process.php +++ b/cms/comment_process.php @@ -121,7 +121,7 @@ if ( $action === 'publish' ) { } - $query_add = "INSERT INTO comments (eps_id,comment_timestamp,comment_author_name,comment_title,comment_text) VALUES ( '{$ep_num}', '{$comment_timestamp_db}', '{$comment_author_name}', '{$comment_title}', '{$comment_text}');UPDATE last_update SET last_udate_timestamp = CURRENT_TIMESTAMP;"; + $query_add = "INSERT INTO comments (eps_id,comment_timestamp,comment_author_name,comment_title,comment_text) VALUES ( '{$ep_num}', '{$comment_timestamp_db}', '{$comment_author_name}', '{$comment_title}', '{$comment_text}')"; $result = mysqli_query($connection, $query_add ); if(!$result) {