Results 1 to 1 of 1
  1. #1
    Join Date
    Oct 2009
    Posts
    1

    Unanswered: delete orphan records form database

    I think, perhaps I could use SQL script to delete the orphan data in database? Then gallery2 would not get slower and slower. Anyone knows how to make it?

    The gallery2 has integrity check module that checks the db but does not repair it.

    Last Run Details:

    Checked 175 entities
    Orphaned data in table AccessMap with no row in AccessSubscriberMap table; ids: 387, 388, 390, 391, 392, 727, 728, 729, 730, 731, 732, 733, 734, 735, 789, 790, 791, 792, 793, 794, 795, 796, 797, 850, 851, 852, 853, 854, 855, 856, 857, 858, 1166, 1167, 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598

    First I need a sql to view the orphan records
    Then sql to delete the orphan records.


    I attach my AccessMap, AccessSubscriberMap SQL tables here.
    I tried to wrte it myself but I'm not a programmer so...

    I also attach my fixed tables (I deleted by hand)
    Thanks for your help.
    Attached Files Attached Files
    Last edited by smilem; 10-28-09 at 14:06.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •