Facebook
From Smelly Octupus, 2 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 84
  1. SELECT commerce_order.order_id AS order_id, commerce_order.uid AS commerce_order_uid, users_commerce_order.uid AS users_commerce_order_uid, commerce_product_field_data_commerce_product.product_id AS commerce_product_field_data_commerce_product_product_id, commerce_payment_transaction_commerce_order.created AS commerce_payment_transaction_commerce_order_created, commerce_recurring_order_commerce_order.id AS commerce_recurring_order_commerce_order_id, commerce_order.created AS commerce_order_created, \'user\' AS field_data_field_user_type_user_entity_type, \'user\' AS field_data_field_expiry_date_user_entity_type
  2. FROM
  3. {commerce_order} commerce_order
  4. LEFT JOIN {field_data_commerce_line_items} field_data_commerce_line_items ON commerce_order.order_id = field_data_commerce_line_items.entity_id AND (field_data_commerce_line_items.entity_type = \'commerce_order\' AND field_data_commerce_line_items.deleted = \'0\')
  5. INNER JOIN {commerce_line_item} commerce_line_item_field_data_commerce_line_items ON field_data_commerce_line_items.commerce_line_items_line_item_id = commerce_line_item_field_data_commerce_line_items.line_item_id
  6. LEFT JOIN {field_data_commerce_product} commerce_line_item_field_data_commerce_line_items__field_data_commerce_product ON commerce_line_item_field_data_commerce_line_items.line_item_id = commerce_line_item_field_data_commerce_line_items__field_data_commerce_product.entity_id AND (commerce_line_item_field_data_commerce_line_items__field_data_commerce_product.entity_type = \'commerce_line_item\' AND commerce_line_item_field_data_commerce_line_items__field_data_commerce_product.deleted = \'0\')
  7. INNER JOIN {commerce_product} commerce_product_field_data_commerce_product ON commerce_line_item_field_data_commerce_line_items__field_data_commerce_product.commerce_product_product_id = commerce_product_field_data_commerce_product.product_id
  8. INNER JOIN {users} users_commerce_order ON commerce_order.uid = users_commerce_order.uid
  9. INNER JOIN {field_data_commerce_recurring_order} field_data_commerce_recurring_order ON commerce_order.order_id = field_data_commerce_recurring_order.commerce_recurring_order_target_id AND (field_data_commerce_recurring_order.entity_type = \'commerce_recurring\' AND field_data_commerce_recurring_order.deleted = \'0\')
  10. INNER JOIN {commerce_recurring} commerce_recurring_order_commerce_order ON field_data_commerce_recurring_order.entity_id = commerce_recurring_order_commerce_order.id
  11. LEFT JOIN {commerce_payment_transaction} commerce_payment_transaction_commerce_order ON commerce_order.order_id = commerce_payment_transaction_commerce_order.order_id
  12. LEFT JOIN {commerce_cardonfile} commerce_cardonfile_users ON users_commerce_order.uid = commerce_cardonfile_users.uid
  13. INNER JOIN {field_data_field_subscription_type} commerce_product_field_data_commerce_product__field_data_field_subscription_type ON commerce_product_field_data_commerce_product.product_id = commerce_product_field_data_commerce_product__field_data_field_subscription_type.entity_id AND (commerce_product_field_data_commerce_product__field_data_field_subscription_type.entity_type = \'commerce_product\' AND commerce_product_field_data_commerce_product__field_data_field_subscription_type.deleted = \'0\')
  14. INNER JOIN {field_data_field_user_type} users_commerce_order__field_data_field_user_type ON users_commerce_order.uid = users_commerce_order__field_data_field_user_type.entity_id AND (users_commerce_order__field_data_field_user_type.entity_type = \'user\' AND users_commerce_order__field_data_field_user_type.deleted = \'0\')
  15. WHERE (( (commerce_product_field_data_commerce_product__field_data_field_subscription_type.field_subscription_type_value = \'Family Subscription\') AND (users_commerce_order__field_data_field_user_type.field_user_type_value = \'Bill Master\') AND (commerce_recurring_order_commerce_order.status <> \'0\') AND (commerce_payment_transaction_commerce_order.created BETWEEN '.$yesterday_1_year_ago.' AND '.$tomorrow_a_year_ago.') AND (commerce_cardonfile_users.card_id IS NOT NULL ) ))
  16. ORDER BY commerce_order_created DESC

Replies to Untitled rss

Title Name Language When
Re: Untitled Wet Ibis sql 2 Years ago.