IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36968 for trunk/ippTools/src


Ignore:
Timestamp:
Jul 2, 2014, 5:28:31 PM (12 years ago)
Author:
watersc1
Message:

Fixed major issue where if a stage_id is used in a different stage, it causes infinite problems.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/remotetool.c

    r36896 r36968  
    9494
    9595  // Get a list of the things we can insert into a new component
     96  // CZW: these labels no longer need to be linked to the table, as I've split stageRun and remoteRun into sub-queries.
    9697  psString query = NULL;
    9798  psString whereOption = psStringCopy("");
     
    104105   
    105106    if (label) {
    106       psStringAppend(&query, " AND (chipRun.label = '%s')", label);
     107      psStringAppend(&whereOption, "\n AND (label = '%s')", label);
    107108    }
    108109  }
     
    115116   
    116117    if (label) {
    117       psStringAppend(&query, " AND (camRun.label = '%s')", label);
     118      psStringAppend(&whereOption, "\n AND (label = '%s')", label);
    118119    }
    119120  }   
     
    128129      // Because warp has to check to see if something other than the state is set correctly, I have to use this wonky way to pass the label in.
    129130      //      psStringAppend(&query, " AND (warpRun.label = '%s')", label);
    130       psStringAppend(&whereOption, "\n AND (warpRun.label = '%s')", label);
     131      psStringAppend(&whereOption, "\n AND (label = '%s')", label);
    131132    }
    132133  }   
     
    139140   
    140141    if (label) {
    141       psStringAppend(&query, " AND (stackRun.label = '%s')", label);
     142      psStringAppend(&whereOption, "\n AND (label = '%s')", label);
    142143    }
    143144  }   
     
    152153    psFree(limitString);
    153154  }
    154   if (!p_psDBRunQueryF(config->dbh, query,whereOption)) {
     155  if (!p_psDBRunQueryF(config->dbh, query,whereOption,whereOption)) { // This needs to be here twice because we need to restrict on label twice.
    155156    psError(PS_ERR_UNKNOWN, false, "database error");
    156157    psFree(query);
Note: See TracChangeset for help on using the changeset viewer.