Results 1 to 4 of 4

Thread: deleted database items

  1. #1
    shawncooper is offline Sugar Community Member
    Join Date
    Jan 2008
    Posts
    18

    Default deleted database items

    Please help
    Someone accidently deleted an account,
    In the accounts tables i marked the account as deleted = 0 so i can see acount again, but all cases relating to account are gone, if i view cases table they are not even their marked as deleted.
    Thanks

  2. #2
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default Re: deleted database items

    have a look at the table accounts_cases

    this holds the link between accounts & cases and the entries should be in there marked as deleted
    Mike Solomon
    Development Manager
    Ivy Ltd
    www.ivy.ltd.uk]www.ivy.ltd.uk

    php version 5.2.6
    MySql 5.1.59

  3. #3
    rafael.q.g@hotmail.com's Avatar
    rafael.q.g@hotmail.com is offline Sugar Community Member
    Join Date
    Jun 2011
    Location
    Florianópolis - Brazil
    Posts
    782

    Default Re: deleted database items

    Then you just have to execute this sql:
    update accounts_cases set deleted=0 where account_id='your_account_id'
    Rafael Queiroz Gonçalves
    Advanced OMG UML Certified Professional
    Sun Certified Enterprise Architect for the Java Platform
    Sun Certified Programmer for the Java 2 Platform
    IBM Certified Advanced Application Developer - Lotus Notes and Domino
    IBM Certified Application Developer - IBM WebSphere Portlet Factory
    Computer Science Mastering / UFSC - PPGCC

  4. #4
    robertbmirth is offline Sugar Community Member
    Join Date
    Jun 2010
    Location
    Irvine, CA
    Posts
    345

    Default Re: deleted database items

    Rafael's query, as I hope you know, will undelete all case relationships related to the account, so if you have some older relationships that you have previously removed, you'll also undelete those relationships as well. If that is the case, don't forget to prune your older relationships.
    Robert Beckman
    Software Engineer
    Mirth Corporation

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Delete deleted Emails from the Database
    By chrislynch8 in forum Help
    Replies: 1
    Last Post: 2011-03-31, 08:19 AM
  2. Replies: 1
    Last Post: 2011-03-10, 01:21 PM
  3. Replies: 0
    Last Post: 2007-09-19, 12:57 PM
  4. Deleted dropdown items recreating
    By Jirka in forum General Discussion
    Replies: 0
    Last Post: 2007-06-08, 04:19 PM
  5. Replies: 0
    Last Post: 2007-02-26, 01:57 PM

Bookmarks

Posting Permissions

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