Resetting Sermon Media

About Support Media Resetting Sermon Media

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #7379

    I fiddled around with the Sermon series adding and deleting a few times. Now I some of the same sermons showing up multiple times. Is there an easy way to clean out all of the records and start over? I don’t know anything about the MySql schema, but I was a Teradata database developer in my recent past. Can I delete the records from the tables or am I asking for trouble?

    Thanks,
    Jeff

    #7380
    Avatar for Andy MoyleAndy Moyle
    Keymaster

    Hi Jeff,
    I’m assuming you can access PHPMyAdmin to look at the database.

    **** EXPORT THE DATABASE FIRST JUST IN CASE THIS GOES PEAR SHAPED ****

    Also assuming your wordpress database table prefix is the default wp_ if not change wp_ to whatever in the MySQL statements below…

    If you want to completely clear the sermon series table

    TRUNCATE TABLE wp_church_admin_sermon_series;

    And the sermon files table

    TRUNCATE TABLE wp_church_admin_sermon_files;

    OR

    This query will show you any duplicated sermon files entries

    SELECT t1.* t1 FROM wp_church_admin_sermon_files t1 INNER JOIN wp_church_admin_sermon_files t2 WHERE t1.file_id < t2.file_id AND t1.file_name!="" AND t1.file_name = t2.file_name;

    And then this one would delete them....

    DELETE t1 FROM wp_church_admin_sermon_files t1 INNER JOIN wp_church_admin_sermon_files t2 WHERE t1.file_id < t2.file_id AND t1.file_name!="" AND t1.file_name = t2.file_name;

    • This reply was modified 2 years, 2 months ago by Avatar for Andy MoyleAndy Moyle.
    #7382

    Thanks Andy for the quick response. I’ll give it a go tomorrow.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.