@@ 8045-8046 (lines=2) @@ | ||
8042 | if ( in_array( $type, PodsForm::file_field_types() ) || 'media' == $pick_object ) { |
|
8043 | $where = "`guid` = '" . pods_sanitize( $pick_value ) . "'"; |
|
8044 | ||
8045 | if ( 0 < pods_absint( $pick_value ) && false !== $numeric_mode ) |
|
8046 | $where = "`ID` = " . pods_absint( $pick_value ); |
|
8047 | ||
8048 | $result = pods_query( "SELECT `ID` AS `id` FROM `{$wpdb->posts}` WHERE `post_type` = 'attachment' AND {$where} ORDER BY `ID`", $this ); |
|
8049 | ||
@@ 8070-8071 (lines=2) @@ | ||
8067 | if ( in_array( 'taxonomy', array( $pick_object, $related_pod[ 'type' ] ) ) ) { |
|
8068 | $where = "`t`.`name` = '" . pods_sanitize( $pick_value ) . "'"; |
|
8069 | ||
8070 | if ( 0 < pods_absint( $pick_value ) && false !== $numeric_mode ) |
|
8071 | $where = "`tt`.`term_id` = " . pods_absint( $pick_value ); |
|
8072 | ||
8073 | $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 ); |
|
8074 | ||
@@ 8081-8082 (lines=2) @@ | ||
8078 | elseif ( in_array( 'post_type', array( $pick_object, $related_pod[ 'type' ] ) ) || in_array( 'media', array( $pick_object, $related_pod[ 'type' ] ) ) ) { |
|
8079 | $where = "`post_title` = '" . pods_sanitize( $pick_value ) . "'"; |
|
8080 | ||
8081 | if ( 0 < pods_absint( $pick_value ) && false !== $numeric_mode ) |
|
8082 | $where = "`ID` = " . pods_absint( $pick_value ); |
|
8083 | ||
8084 | $result = pods_query( "SELECT `ID` AS `id` FROM `{$wpdb->posts}` WHERE `post_type` = '{$pick_val}' AND {$where} ORDER BY `ID`", $this ); |
|
8085 | ||
@@ 8092-8093 (lines=2) @@ | ||
8089 | elseif ( in_array( 'user', array( $pick_object, $related_pod[ 'type' ] ) ) ) { |
|
8090 | $where = "`user_login` = '" . pods_sanitize( $pick_value ) . "'"; |
|
8091 | ||
8092 | if ( 0 < pods_absint( $pick_value ) && false !== $numeric_mode ) |
|
8093 | $where = "`ID` = " . pods_absint( $pick_value ); |
|
8094 | ||
8095 | $result = pods_query( "SELECT `ID` AS `id` FROM `{$wpdb->users}` WHERE {$where} ORDER BY `ID`", $this ); |
|
8096 |