Changeset 13


Ignore:
Timestamp:
Jun 18, 2015, 12:49:58 PM (10 years ago)
Author:
gegorbet
Message:

fix AIRA cleanup.php to update any mrecs record with modelID

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cleanup.php

    r10 r13  
    568568   }
    569569
     570   // Now possibly fix up mrecs entries
     571
     572   foreach ( $mrecsIDs as $mrecsID )
     573   {
     574      $modelGUID = $rmodlGUIDs[ $mrecsID ];
     575      $query = "UPDATE pcsa_modelrecs SET "                                                 .
     576               "modelID="                                                          .
     577               "(SELECT modelID FROM model WHERE modelGUID='$modelGUID')"          .
     578               "WHERE mrecsID=$mrecsID";
     579
     580      $result = mysql_query( $query, $us3_link );
     581
     582      if ( ! $result )
     583      {
     584         write_log( "$me: Bad query:\n$query\n" . mysql_error( $us3_link ) );
     585         mail_to_user( "fail", "Bad query\n$query\n" . mysql_error( $us3_link ) );
     586         return( -1 );
     587      }
     588write_log( "$me:     mrecs entry updated : mrecsID=$mrecsID" );
     589   }
     590//write_log( "$me:     mrecs entries updated" );
     591
    570592   // Copy results to LIMS submit directory (files there are deleted after 7 days)
    571593   global $submit_dir; // LIMS submit files dir
Note: See TracChangeset for help on using the changeset viewer.