SQL Inventory

List of all SQL mentioned in the code..

ValueCountFile:Line
"SHOW TABLES LIKE '{$as_table_name}'"
1
  • /woocommerce-memberships.php
"INSERT {$wpdb->actionscheduler_logs} (action_id, message, log_date_gmt, log_date_local) VALUES "
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_DBLogger.php
"UPDATE {$wpdb->posts} SET post_password = %s, post_modified_gmt = %s, post_modified = %s"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php
"SELECT COUNT(DISTINCT post_password) FROM {$wpdb->posts} WHERE post_password != '' AND post_type = %s AND post_status IN ('in-progress','pending')"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php
'SELECT p.ID '
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php
'SELECT count(p.ID)'
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php
"SELECT p.ID FROM {$wpdb->posts} p"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php
"SELECT comment_approved, COUNT( * ) AS num_comments FROM {$wpdb->comments} WHERE comment_type NOT IN('order_note','action_log') GROUP BY comment_approved"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_wpCommentLogger.php
"SELECT * FROM {$wpdb->actionscheduler_logs} WHERE action_id=%d"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_DBLogger.php
"UPDATE {$wpdb->posts} SET post_password = '' WHERE ID IN ($action_id_string) AND post_password = %s"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php
"SELECT * FROM {$wpdb->actionscheduler_logs} WHERE log_id=%d"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_DBLogger.php
"SELECT COUNT({$this->ID}) FROM {$this->table_name} {$where}"
1
  • /lib/prospress/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php
"SELECT $columns FROM {$this->table_name} {$where} {$order} {$limit} {$offset}"
1
  • /lib/prospress/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php
"DELETE FROM {$this->table_name} WHERE {$this->ID} IN $ids_sql"
1
  • /lib/prospress/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php
"
                    SELECT items_table.order_id AS order_id,
                           items_meta_table.meta_value AS product_id
                    FROM 
{$items_table} AS items_table
                    JOIN 
{$meta_table}  AS items_meta_table
                    ON items_table.order_item_id = items_meta_table.order_item_id
                    WHERE items_table.order_id IN (
{$order_ids})
                    AND ( ( items_meta_table.meta_key = '_product_id'   AND items_meta_table.meta_value IN (
{$product_ids}) )
                     OR   ( items_meta_table.meta_key = '_variation_id' AND items_meta_table.meta_value IN (
{$product_ids}) ) )
                "
1
  • /includes/utilities/class-wc-memberships-grant-retroactive-access.php
'Select User'
1
  • /includes/admin/modals/abstract-wc-memberships-member-modal.php
'Delete note'
1
  • /includes/admin/meta-boxes/views/class-wc-memberships-meta-box-view-membership-note.php
"SELECT ID FROM {$wpdb->posts} WHERE post_type = %s AND post_password = %s"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php
"UPDATE {$wpdb->posts} SET post_password = '' WHERE ID = %d AND post_type = %s"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php
"SELECT ID FROM {$wpdb->posts} WHERE post_type = 'scheduled-action'"
1
  • /woocommerce-memberships.php
"SELECT a.status, count(a.status) as 'count'"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php
"UPDATE {$wpdb->actionscheduler_actions} SET attempts = attempts+1, status=%s, last_attempt_gmt = %s, last_attempt_local = %s WHERE action_id = %d"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php
"SELECT action_id FROM {$wpdb->actionscheduler_actions} WHERE claim_id=%d"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php
"SELECT claim_id FROM {$wpdb->actionscheduler_actions} WHERE action_id=%d"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php
"SELECT COUNT(DISTINCT claim_id) FROM {$wpdb->actionscheduler_actions} WHERE claim_id != 0 AND status IN ( %s, %s)"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php
"UPDATE {$wpdb->actionscheduler_actions} SET claim_id=%d, last_attempt_gmt=%s, last_attempt_local=%s"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php
"SELECT * FROM {$wpdb->actionscheduler_actions} WHERE action_id=%d"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php
"UPDATE {$wpdb->actionscheduler_actions} SET status = %s WHERE action_id IN {$query_in}"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php
'SELECT a.action_id'
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php
"UPDATE {$wpdb->posts} SET post_status = %s WHERE ID = %d AND post_type = %s"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php
'SELECT count(a.action_id)'
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php
"SELECT a.action_id FROM {$wpdb->actionscheduler_actions} a"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php
"SELECT a.*, g.slug AS `group` FROM {$wpdb->actionscheduler_actions} a LEFT JOIN {$wpdb->actionscheduler_groups} g ON a.group_id=g.group_id WHERE a.action_id=%d"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php
"SELECT group_id FROM {$wpdb->actionscheduler_groups} WHERE slug=%s"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php
"SELECT MAX(ID) FROM $wpdb->posts"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php
"UPDATE {$wpdb->posts} SET menu_order = menu_order+1, post_status=%s, post_modified_gmt = %s, post_modified = %s WHERE ID = %d AND post_type = %s"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php
"SELECT {$column_name} FROM {$wpdb->posts} WHERE ID=%d AND post_type=%s"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php
'Update expiration date to plan length'
1
  • /includes/admin/meta-boxes/class-wc-memberships-meta-box-user-membership-data.php
'Update start date to plan start access date'
1
  • /includes/admin/meta-boxes/class-wc-memberships-meta-box-user-membership-data.php
'Delete User Membership'
1
  • /includes/admin/meta-boxes/class-wc-memberships-meta-box-user-membership-data.php
"
                            SELECT p.ID
                            FROM 
{$wpdb->posts} p
                            WHERE p.post_type = 'product_variation'
                            AND p.post_parent IN (
{$parents})
                        "
1
  • /includes/class-wc-memberships-restrictions.php
"
            SELECT * FROM 
$wpdb->postmeta
            WHERE post_id  = %d
        "
1
  • /includes/api/abstract-wc-memberships-rest-api-controller.php
"
                    SELECT object_id FROM 
$wpdb->term_relationships
                    LEFT JOIN 
$wpdb->term_taxonomy ON $wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id
                    WHERE term_id IN (
$placeholder)
                "
1
  • /includes/frontend/class-wc-memberships-posts-restrictions.php
"
                SELECT object_id FROM 
$wpdb->term_relationships
                LEFT JOIN 
$wpdb->term_taxonomy ON $wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id
                WHERE 
$wpdb->term_taxonomy.taxonomy IN ($term_taxonomies)
            "
1
  • /includes/frontend/class-wc-memberships-posts-restrictions.php
"
                    SELECT sub_t.term_id FROM 
$wpdb->terms AS sub_t
                    INNER JOIN 
$wpdb->term_taxonomy AS sub_tt ON sub_t.term_id = sub_tt.term_id
                    WHERE sub_tt.taxonomy IN (
$taxonomies)
                "
1
  • /includes/frontend/class-wc-memberships-posts-restrictions.php
"
                    SELECT object_id FROM 
$wpdb->term_relationships
                    LEFT JOIN 
$wpdb->posts ON $wpdb->posts.ID = $wpdb->term_relationships.object_id
                    LEFT JOIN 
$wpdb->term_taxonomy ON $wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id
                    WHERE CASE 
$case END
                    AND term_id IN (
$taxonomy_terms)
                "
1
  • /includes/frontend/class-wc-memberships-posts-restrictions.php
"
                SELECT object_id FROM 
$wpdb->term_relationships
                LEFT JOIN 
$wpdb->posts ON $wpdb->posts.ID = $wpdb->term_relationships.object_id
                LEFT JOIN 
$wpdb->term_taxonomy ON $wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id
                WHERE CASE 
$case END
                AND 
$wpdb->term_taxonomy.taxonomy IN ($taxonomies)
            "
1
  • /includes/frontend/class-wc-memberships-posts-restrictions.php
"SELECT ID FROM $wpdb->posts WHERE post_type IN ($post_types)"
1
  • /includes/frontend/class-wc-memberships-posts-restrictions.php
"
                    SELECT p.ID, p.post_type
                    FROM 
$wpdb->posts p
                    LEFT JOIN 
$wpdb->postmeta pm
                    ON p.ID = pm.post_id
                    WHERE pm.meta_key = '_wc_memberships_force_public'
                    AND pm.meta_value = 'yes'
                "
1
  • /includes/class-wc-memberships-restrictions.php
"SELECT user_id FROM $table WHERE group_id=%d"
1
  • /includes/integrations/groups/class-wc-memberships-integration-groups.php
"SELECT ID FROM $wpdb->posts WHERE post_parent = %d"
1
  • /includes/class-wc-memberships-membership-plans.php
"
                    SELECT posts_meta.meta_value
                    FROM 
{$wpdb->prefix}postmeta AS posts_meta
                    WHERE posts_meta.post_id IN (
{$order_ids})
                    AND posts_meta.meta_key = '_customer_user'
                "
1
  • /includes/class-wc-memberships-ajax.php
"
                SELECT DISTINCT posts.ID
                FROM 
{$wpdb->prefix}woocommerce_order_itemmeta AS order_item_meta,
                     
{$wpdb->prefix}woocommerce_order_items AS order_items,
                     
{$wpdb->prefix}posts AS posts
                WHERE order_items.order_item_id = order_item_meta.order_item_id
                AND order_items.order_id = posts.ID
                AND ( ( order_item_meta.meta_key LIKE '_product_id'   AND order_item_meta.meta_value IN (
{$product_ids}) )
                 OR   ( order_item_meta.meta_key LIKE '_variation_id' AND order_item_meta.meta_value IN (
{$product_ids}) ) )
            "
1
  • /includes/class-wc-memberships-ajax.php
"
                SELECT COUNT(comment_ID)
                FROM 
$wpdb->comments
                WHERE comment_post_ID in (
                      SELECT ID
                      FROM 
$wpdb->posts
                      WHERE post_type = 'wc_user_membership'
                  )
              "
1
  • /includes/class-wc-memberships-user-memberships.php
'Select plans whose members should not be offered this rate.'
1
  • /includes/class-wc-memberships-shipping.php
'Select plans whose members should be offered free shipping.'
1
  • /includes/class-wc-memberships-shipping.php
"
                    SELECT ID FROM 
$wpdb->posts
                    WHERE post_parent IN 
$parents
                "
1
  • /includes/class-wc-memberships-member-discounts.php
"
                SELECT p.ID FROM 
$wpdb->posts p
                LEFT JOIN 
$wpdb->postmeta pm
                ON p.ID = pm.post_id
                WHERE p.post_type = 'product'
                AND pm.meta_key = '_wc_memberships_exclude_discounts'
                AND pm.meta_value = 'yes'
            "
1
  • /includes/class-wc-memberships-member-discounts.php
"SELECT group_id, name FROM $group_table ORDER BY group_id"
1
  • /includes/integrations/groups/class-wc-memberships-integration-groups.php
"SELECT status FROM {$wpdb->actionscheduler_actions} WHERE action_id=%d"
1
  • /lib/prospress/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php
'Select which membership plans does purchasing this product grant access to.'
1
  • /includes/admin/meta-boxes/class-wc-memberships-meta-box-product-memberships-data.php
'Delete with subscription'
1
  • /includes/integrations/subscriptions/class-wc-memberships-integration-subscriptions-admin.php
'Select a page…'
1
  • /includes/admin/class-wc-memberships-setup-wizard.php
'Show excerpts'
1
  • /includes/admin/class-wc-memberships-settings.php
'Select the page to redirect non-members to - should contain the [wcm_content_restricted] shortcode.'
1
  • /includes/admin/class-wc-memberships-settings.php
'Delete all matching memberships when %1$susers request to erase their personal data%2$s.'
1
  • /includes/admin/class-wc-memberships-settings.php
'Select when & where to display login reminder notice for guests if products in cart have member discounts.'
1
  • /includes/admin/class-wc-memberships-settings.php
'Show on both cart & checkout page'
1
  • /includes/admin/class-wc-memberships-settings.php
'Show on checkout page'
1
  • /includes/admin/class-wc-memberships-settings.php
'Show on cart page'
1
  • /includes/admin/class-wc-memberships-settings.php
'Update existing records if a matching user membership is found'
1
  • /includes/admin/class-wc-memberships-import-export-handler.php
"SELECT %d, '$meta_key', '$meta_value'"
1
  • /includes/admin/class-wc-memberships-admin-membership-plans.php
"INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) "
1
  • /includes/admin/class-wc-memberships-admin-membership-plans.php
"
            SELECT meta_key, meta_value
            FROM 
$wpdb->postmeta
            WHERE post_id=%d
        "
1
  • /includes/admin/class-wc-memberships-admin-membership-plans.php
'Delete this membership permanently'
1
  • /includes/admin/class-wc-memberships-admin-user-memberships.php
'Delete User Membership with Subscription'
1
  • /includes/integrations/subscriptions/class-wc-memberships-integration-subscriptions-admin.php
"SELECT * FROM $wpdb->posts WHERE ID=%d"
2
  • /includes/admin/class-wc-memberships-admin-membership-plans.php
  • /includes/admin/class-wc-memberships-admin-membership-plans.php
'Delete this membership permanently and the subscription associated with it'
2
  • /includes/integrations/subscriptions/class-wc-memberships-integration-subscriptions-admin.php
  • /includes/integrations/subscriptions/class-wc-memberships-integration-subscriptions-admin.php
'Delete Selected'
3
  • /includes/admin/meta-boxes/views/class-wc-memberships-meta-box-view-purchasing-discount-rules.php
  • /includes/admin/meta-boxes/views/class-wc-memberships-meta-box-view-content-restriction-rules.php
  • /includes/admin/meta-boxes/views/class-wc-memberships-meta-box-view-product-restriction-rules.php
'Select all'
3
  • /includes/admin/meta-boxes/views/class-wc-memberships-meta-box-view-purchasing-discount-rules.php
  • /includes/admin/meta-boxes/views/class-wc-memberships-meta-box-view-content-restriction-rules.php
  • /includes/admin/meta-boxes/views/class-wc-memberships-meta-box-view-product-restriction-rules.php