Changeset 28082 for trunk/ippTools/src/warptool.c
- Timestamp:
- May 24, 2010, 7:18:05 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/warptool.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/warptool.c
r28056 r28082 940 940 941 941 // treat limit == 0 as "no limit" 942 psString limitString = psStringCopy("\n ");942 psString limitString = psStringCopy("\nORDER BY priority DESC, warp_id"); 943 943 if (limit) { 944 // We apply the limit to both sides of the UNION 945 // to avoid slow queries and to the query itself 946 // to satisfy the user's requested limit 944 // We apply the limit to both sides of the UNION to avoid slow queries 945 // and to the query itself to satisfy the user's requested limit 947 946 psStringAppend(&limitString, "%s", psDBGenerateLimitSQL(limit)); 948 947 psStringAppend(&query, " %s", limitString); 949 948 } 950 949 951 #define TWO_WHERES952 #ifdef TWO_WHERES953 950 if (!p_psDBRunQueryF(config->dbh, query, whereStr, limitString, whereStr, limitString)) { 954 951 psError(PS_ERR_UNKNOWN, false, "database error"); … … 956 953 return false; 957 954 } 958 #else959 if (!p_psDBRunQueryF(config->dbh, query, whereStr)) {960 psError(PS_ERR_UNKNOWN, false, "database error");961 psFree(query);962 return false;963 }964 #endif965 955 psFree(limitString); 966 956 psFree(whereStr);
Note:
See TracChangeset
for help on using the changeset viewer.
