Skip to content

Instantly share code, notes, and snippets.

@leo493852107
Last active January 13, 2020 08:48
Show Gist options
  • Select an option

  • Save leo493852107/63ba9a84413ff2cf9a4e2b81848c6ccd to your computer and use it in GitHub Desktop.

Select an option

Save leo493852107/63ba9a84413ff2cf9a4e2b81848c6ccd to your computer and use it in GitHub Desktop.
mysql导出SQL导出客户的计划单item(planorder_item)
mysql -h127.0.0.1 -uroot -p --default-character-set=utf8 -e "SELECT customer_customer.short_name, sale_planorderitem.* FROM sale_planorder INNER JOIN customer_customer ON sale_planorder.customer_id=customer_customer.id INNER JOIN sale_planorderitem ON sale_planorderitem.order_id=sale_planorder.id
WHERE customer_customer.short_name='客户名称' AND sale_planorder.add_time>='2019-08-01 00:00:00' AND sale_planorder.add_time<='2019-10-01 00:00:00' ORDER BY sale_planorder.add_time;" hey_star_crm > /Users/leo/Downloads/test.xls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment