| @@ 216-225 (lines=10) @@ | ||
| 213 | ); | |
| 214 | ||
| 215 | // if $where_query exists lets add them to the query_params. | |
| 216 |         if (! empty($extra_join_model_fields_n_values)) { | |
| 217 | // make sure we strip any of the join model names from the $where_query cause we don't need that in here (why? because client code may have used the same conditionals for get_all_related which DOES need the join model name) | |
| 218 | // make sure we strip THIS models name from the query param | |
| 219 | $parsed_query = array(); | |
| 220 |             foreach ($extra_join_model_fields_n_values as $query_param => $val) { | |
| 221 | $query_param = str_replace( | |
| 222 | $this->get_join_model()->get_this_model_name() . ".", | |
| 223 | "", | |
| 224 | $query_param | |
| 225 | ); | |
| 226 | $parsed_query[ $query_param ] = $val; | |
| 227 | } | |
| 228 | $cols_n_values = array_merge($cols_n_values, $parsed_query); | |
| @@ 285-294 (lines=10) @@ | ||
| 282 | ); | |
| 283 | ||
| 284 | // if $where_query exists lets add them to the query_params. | |
| 285 |         if (! empty($where_query)) { | |
| 286 | // make sure we strip any of the join model names from the $where_query cause we don't need that in here (why? because client code may have used the same conditionals for get_all_related which DOES need the join model name) | |
| 287 | // make sure we strip THIS models name from the query param | |
| 288 | $parsed_query = array(); | |
| 289 |             foreach ($where_query as $query_param => $val) { | |
| 290 | $query_param = str_replace( | |
| 291 | $this->get_join_model()->get_this_model_name() . ".", | |
| 292 | "", | |
| 293 | $query_param | |
| 294 | ); | |
| 295 | $parsed_query[ $query_param ] = $val; | |
| 296 | } | |
| 297 | $cols_n_values = array_merge($cols_n_values, $parsed_query); | |
| @@ 164-173 (lines=10) @@ | ||
| 161 | ); | |
| 162 | ||
| 163 | // if $where_query exists lets add them to the query_params. | |
| 164 |         if (! empty($extra_join_model_fields_n_values)) { | |
| 165 | // make sure we strip any of the join model names from the $where_query cause we don't need that in here (why? because client code may have used the same conditionals for get_all_related which DOES need the join model name) | |
| 166 | // make sure we strip THIS models name from the query param | |
| 167 | $parsed_query = array(); | |
| 168 |             foreach ($extra_join_model_fields_n_values as $query_param => $val) { | |
| 169 | $query_param = str_replace( | |
| 170 | $this->get_join_model()->get_this_model_name() . ".", | |
| 171 | "", | |
| 172 | $query_param | |
| 173 | ); | |
| 174 | $parsed_query[ $query_param ] = $val; | |
| 175 | } | |
| 176 | $all_fields = array_merge($foreign_keys, $parsed_query); | |
| @@ 215-224 (lines=10) @@ | ||
| 212 | ); | |
| 213 | ||
| 214 | // if $where_query exists lets add them to the query_params. | |
| 215 |         if (! empty($where_query)) { | |
| 216 | // make sure we strip any of the join model names from the $where_query cause we don't need that in here (why? because client code may have used the same conditionals for get_all_related which DOES need the join model name) | |
| 217 | // make sure we strip THIS models name from the query param | |
| 218 | $parsed_query = array(); | |
| 219 |             foreach ($where_query as $query_param => $val) { | |
| 220 | $query_param = str_replace( | |
| 221 | $this->get_join_model()->get_this_model_name() . ".", | |
| 222 | "", | |
| 223 | $query_param | |
| 224 | ); | |
| 225 | $parsed_query[ $query_param ] = $val; | |
| 226 | } | |
| 227 | $cols_n_values = array_merge($cols_n_values, $parsed_query); | |