Changeset 23660 for trunk/ippTools/src/magictool.c
- Timestamp:
- Apr 1, 2009, 3:21:51 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/magictool.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/magictool.c
r23389 r23660 930 930 PXOPT_COPY_S64(config->args, where, "-magic_id", "magic_id", "=="); 931 931 PXOPT_COPY_STR(config->args, where, "-node", "node", "=="); 932 PXOPT_COPY_S16(config->args, where, "-code", "fault", "=="); 933 934 psString query = psStringCopy("DELETE FROM magicNodeResult WHERE fault != 0"); 932 PXOPT_COPY_STR(config->args, where, "-label", "label", "=="); 933 PXOPT_COPY_S16(config->args, where, "-code", "magicNodeResult.fault", "=="); 934 935 psString query = pxDataGet("magictool_revertnode.sql"); 936 if (!query) { 937 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 938 return false; 939 } 935 940 936 941 if (psListLength(where->list)) { … … 938 943 psStringAppend(&query, " AND %s", whereClause); 939 944 psFree(whereClause); 945 } else { 946 psError(PS_ERR_UNKNOWN, false, "search parameters are required"); 947 psFree(where); 948 return false; 940 949 } 941 950 psFree(where); … … 945 954 return false; 946 955 } 956 957 psS32 numUpdated = psDBAffectedRows(config->dbh); 958 psLogMsg("magictool", PS_LOG_INFO, "Updated %d magic nodes", numUpdated); 959 947 960 return true; 948 961 }
Note:
See TracChangeset
for help on using the changeset viewer.
