@@ 7847-7848 (lines=2) @@ | ||
7844 | if ( in_array( $type, PodsForm::file_field_types() ) || 'media' == $pick_object ) { |
|
7845 | $where = "`guid` = '" . pods_sanitize( $pick_value ) . "'"; |
|
7846 | ||
7847 | if ( 0 < pods_absint( $pick_value ) && false !== $numeric_mode ) |
|
7848 | $where = "`ID` = " . pods_absint( $pick_value ); |
|
7849 | ||
7850 | $result = pods_query( "SELECT `ID` AS `id` FROM `{$wpdb->posts}` WHERE `post_type` = 'attachment' AND {$where} ORDER BY `ID`", $this ); |
|
7851 | ||
@@ 7872-7873 (lines=2) @@ | ||
7869 | if ( in_array( 'taxonomy', array( $pick_object, $related_pod[ 'type' ] ) ) ) { |
|
7870 | $where = "`t`.`name` = '" . pods_sanitize( $pick_value ) . "'"; |
|
7871 | ||
7872 | if ( 0 < pods_absint( $pick_value ) && false !== $numeric_mode ) |
|
7873 | $where = "`tt`.`term_id` = " . pods_absint( $pick_value ); |
|
7874 | ||
7875 | $result = pods_query( "SELECT `t`.`term_id` AS `id` FROM `{$wpdb->term_taxonomy}` AS `tt` LEFT JOIN `{$wpdb->terms}` AS `t` ON `t`.`term_id` = `tt`.`term_id` WHERE `taxonomy` = '{$pick_val}' AND {$where} ORDER BY `t`.`term_id`", $this ); |
|
7876 | ||
@@ 7883-7884 (lines=2) @@ | ||
7880 | elseif ( in_array( 'post_type', array( $pick_object, $related_pod[ 'type' ] ) ) || in_array( 'media', array( $pick_object, $related_pod[ 'type' ] ) ) ) { |
|
7881 | $where = "`post_title` = '" . pods_sanitize( $pick_value ) . "'"; |
|
7882 | ||
7883 | if ( 0 < pods_absint( $pick_value ) && false !== $numeric_mode ) |
|
7884 | $where = "`ID` = " . pods_absint( $pick_value ); |
|
7885 | ||
7886 | $result = pods_query( "SELECT `ID` AS `id` FROM `{$wpdb->posts}` WHERE `post_type` = '{$pick_val}' AND {$where} ORDER BY `ID`", $this ); |
|
7887 | ||
@@ 7894-7895 (lines=2) @@ | ||
7891 | elseif ( in_array( 'user', array( $pick_object, $related_pod[ 'type' ] ) ) ) { |
|
7892 | $where = "`user_login` = '" . pods_sanitize( $pick_value ) . "'"; |
|
7893 | ||
7894 | if ( 0 < pods_absint( $pick_value ) && false !== $numeric_mode ) |
|
7895 | $where = "`ID` = " . pods_absint( $pick_value ); |
|
7896 | ||
7897 | $result = pods_query( "SELECT `ID` AS `id` FROM `{$wpdb->users}` WHERE {$where} ORDER BY `ID`", $this ); |
|
7898 |