最新消息:觉得本站不错的话 记得收藏哦 博客内某些功能仅供测试 讨论群:135931704 快养不起小站了 各位有闲钱就打赏下把 My Email weicots#gmail.com Please replace # with @

zencart 导出带图的订单之 获取定单综合信息之查询优化

MySQL ajiang-tuzi 4066浏览
#综合查询 客户信息weicot.com
SELECT 
zo.orders_id as v_orders_id,
customers_id as v_customers_id,
customers_name as v_customers_name,
customers_company as v_customers_company,
customers_street_address as v_customers_street_address,
customers_suburb as v_customers_suburb,
customers_city as v_customers_city,
customers_postcode as v_customers_postcode,
customers_country as v_customers_country,
customers_telephone as v_customers_telephone,
customers_email_address as v_customers_email_address,
date_purchased as v_date_purchased,
orders_status_name as v_orders_status_name,
products_model as v_products_model,
products_name as v_products_name,
order_total as v_total_cost
FROM orders zo JOIN orders_products zop
	ON(zo.orders_id = zop.orders_id), orders_status zos
	WHERE zos.orders_status_id != '3'
	AND zo.orders_status = zos.orders_status_id	 limit 0,10;

#产品信息 weicot.com
SELECT 
zo.orders_id as v_orders_id,
customers_id as v_customers_id,
customers_name as v_customers_name,
customers_company as v_customers_company,
customers_street_address as v_customers_street_address,
customers_suburb as v_customers_suburb,
customers_city as v_customers_city,
customers_postcode as v_customers_postcode,
customers_country as v_customers_country,
customers_telephone as v_customers_telephone,
customers_email_address as v_customers_email_address,
date_purchased as v_date_purchased,
orders_status_name as v_orders_status_name,
products_model as v_products_model,
products_name as v_products_name,
products_options as v_products_options,
products_options_values as v_products_options_values
FROM orders_products zop LEFT JOIN  orders_products_attributes opa
ON(zop.orders_products_id = opa.orders_products_id), orders  zo, orders_status zos
WHERE zo.orders_id = zop.orders_id
AND zos.orders_status_id != '3'
AND zo.orders_status = zos.orders_status_id limit 0,10;

#根据订单导出定单信息 weicot.com

SELECT 
zo.orders_id as v_orders_id,
customers_id as v_customers_id,
customers_name as v_customers_name,
customers_company as v_customers_company,
customers_street_address as v_customers_street_address,
customers_suburb as v_customers_suburb,
customers_city as v_customers_city,
customers_postcode as v_customers_postcode,
customers_country as v_customers_country,
customers_telephone as v_customers_telephone,
customers_email_address as v_customers_email_address,
date_purchased as v_date_purchased,
orders_status_name as v_orders_status_name,
products_model as v_products_model,
products_name as v_products_name,
products_options as v_products_options,
products_options_values as v_products_options_values
FROM orders_products zop LEFT JOIN  orders_products_attributes opa
ON(zop.orders_products_id = opa.orders_products_id), orders  zo, orders_status zos
WHERE zo.orders_id = zop.orders_id
AND zo.orders_id = '14731'
AND zo.orders_status = zos.orders_status_id limit 0,10;

                                                  
SELECT 
zo.orders_id as v_orders_id,
customers_id as v_customers_id,
customers_name as v_customers_name,
customers_company as v_customers_company,
customers_street_address as v_customers_street_address,
customers_suburb as v_customers_suburb,
customers_city as v_customers_city,
customers_postcode as v_customers_postcode,
customers_country as v_customers_country,
customers_telephone as v_customers_telephone,
customers_email_address as v_customers_email_address,
date_purchased as v_date_purchased,
orders_status_name as v_orders_status_name,
products_model as v_products_model,
products_name as v_products_name,
products_options as v_products_options,
products_options_values as v_products_options_values
FROM orders_products zop LEFT JOIN  orders_products_attributes opa
ON(zop.orders_products_id = opa.orders_products_id), orders  zo, orders_status zos
WHERE zo.orders_id = zop.orders_id
AND zos.orders_status_id != '3'
AND zo.orders_id = '14731'
AND zo.orders_status = zos.orders_status_id limit 0,10;

转载请注明:(●--●) Hello.My Weicot » zencart 导出带图的订单之 获取定单综合信息之查询优化

蜀ICP备15020253号-1