Changeset 251 for trunk/web/addons/job_monarch/libtoga.php
- Timestamp:
- 04/13/06 11:40:35 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web/addons/job_monarch/libtoga.php
r248 r251 144 144 global $SEARCH_RESULT_LIMIT; 145 145 146 if( $id ) 147 $query = "SELECT job_id FROM jobs WHERE job_id = '$id' AND job_status = 'F'"; 148 else { 146 if( $id ) { 147 $select_query = "SELECT job_id FROM jobs WHERE job_id = '$id' AND job_status = 'F'"; 148 $this->resultcount = 1; 149 } else { 149 150 $query_args = array(); 150 151 … … 175 176 } 176 177 $query .= $extra_query_args; 177 } 178 179 $count_result_idname = "COUNT(job_id)"; 180 $select_result_idname = "job_id"; 181 182 $count_query = "SELECT " . $count_result_idname . " " . $query; 183 184 $count_result = $this->queryDbase( $count_query ); 185 $this->resultcount = (int) $count_result[0][count]; 186 187 $select_query = "SELECT " . $select_result_idname . " " . $query . " ORDER BY job_id LIMIT " . $SEARCH_RESULT_LIMIT; 178 179 $count_result_idname = "COUNT(job_id)"; 180 $select_result_idname = "job_id"; 181 182 $count_query = "SELECT " . $count_result_idname . " " . $query; 183 184 $count_result = $this->queryDbase( $count_query ); 185 $this->resultcount = (int) $count_result[0][count]; 186 187 $select_query = "SELECT " . $select_result_idname . " " . $query . " ORDER BY job_id LIMIT " . $SEARCH_RESULT_LIMIT; 188 } 189 188 190 $ids = $this->queryDbase( $select_query ); 189 191
Note: See TracChangeset
for help on using the changeset viewer.