@@ 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); |
|
@@ 220-229 (lines=10) @@ | ||
217 | ); |
|
218 | ||
219 | // if $where_query exists lets add them to the query_params. |
|
220 | if (! empty($where_query)) { |
|
221 | // 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) |
|
222 | // make sure we strip THIS models name from the query param |
|
223 | $parsed_query = array(); |
|
224 | foreach ($where_query as $query_param => $val) { |
|
225 | $query_param = str_replace( |
|
226 | $this->get_join_model()->get_this_model_name() . ".", |
|
227 | "", |
|
228 | $query_param |
|
229 | ); |
|
230 | $parsed_query[ $query_param ] = $val; |
|
231 | } |
|
232 | $cols_n_values = array_merge($cols_n_values, $parsed_query); |