Ticket #1044 (closed バグ指摘: 修正済)

Opened 13 years ago

Last modified 13 years ago

[管理画面]顧客管理/受注管理:MySQLの場合、CSVダウンロードでSQL構文エラー

Reported by: kotani Owned by: AMUAMU
Priority: Milestone: EC-CUBE2.11.0 リファクタリングProject
Component: 管理画面 Version: 2.11.0 β
Keywords: Cc:
修正済み:

Description (last modified by kotani) (diff)

管理画面>顧客管理>CSVダウンロード

SQL: SELECT customer_id, name01, name02, kana01, kana02, zip01, zip02, (SELECT name FROM mtb_pref WHERE CAST(mtb_pref.id AS smallint) = dtb_customer.pref) as pref, addr01, addr02, email, tel01, tel02, tel03, fax01, fax02, fax03, (SELECT name FROM mtb_sex WHERE CAST(mtb_sex.id AS smallint) = dtb_customer.sex) as sex, (SELECT name FROM mtb_job WHERE CAST(mtb_job.id AS smallint) = dtb_customer.job) as job, birth, first_buy_date, last_buy_date, buy_times, point, note, create_date, update_date FROM dtb_customer WHERE del_flg = 0

MDB2 Error: syntax error

_doQuery: [Error message: Could not execute statement]
[Last executed query: PREPARE mdb2_statement_mysql_4c5ee077e9e303e6e60c6d4c5c62eadbca88ad17a FROM 'SELECT customer_id, name01, name02, kana01, kana02, zip01, zip02, (SELECT name FROM mtb_pref WHERE CAST(mtb_pref.id AS smallint) = dtb_customer.pref) as pref, addr01, addr02, email, tel01, tel02, tel03, fax01, fax02, fax03, (SELECT name FROM mtb_sex WHERE CAST(mtb_sex.id AS smallint) = dtb_customer.sex) as sex, (SELECT name FROM mtb_job WHERE CAST(mtb_job.id AS smallint) = dtb_customer.job) as job, birth, first_buy_date, last_buy_date, buy_times, point, note, create_date, update_date FROM dtb_customer WHERE del_flg = 0 ']
[Native code: 1064]
[Native message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'smallint) = dtb_customer.pref) as pref, addr01, addr02, email, tel01, tel02, tel' at line 1]

管理画面>受注管理>CSVダウンロード

SQL: SELECT order_id, customer_id, message, order_name01, order_name02, order_kana01, order_kana02, order_email, order_tel01, order_tel02, order_tel03, order_fax01, order_fax02, order_fax03, order_zip01, order_zip02, (SELECT name FROM mtb_pref WHERE CAST(mtb_pref.id AS smallint) = dtb_order.order_pref), order_addr01, order_addr02, order_sex, order_birth, order_job, subtotal, discount, deliv_fee, charge, use_point, add_point, tax, total, payment_total, deliv_id, payment_method, note, status, create_date, create_date, commit_date, device_type_id, (SELECT COUNT(shipping_id) as shipping_target_num FROM dtb_shipping WHERE dtb_shipping.order_id = dtb_order.order_id), (SELECT GROUP_CONCAT(shipping_id SEPARATOR ',') FROM dtb_shipping WHERE dtb_shipping.order_id = dtb_order.order_id) as shipping_ids FROM dtb_order WHERE del_flg = 0 ORDER BY update_date DESC

MDB2 Error: syntax error

_doQuery: [Error message: Could not execute statement]
[Last executed query: PREPARE mdb2_statement_mysql_47efbbdb8784f26f78ddac09385fe759f5247a139 FROM 'SELECT order_id, customer_id, message, order_name01, order_name02, order_kana01, order_kana02, order_email, order_tel01, order_tel02, order_tel03, order_fax01, order_fax02, order_fax03, order_zip01, order_zip02, (SELECT name FROM mtb_pref WHERE CAST(mtb_pref.id AS smallint) = dtb_order.order_pref), order_addr01, order_addr02, order_sex, order_birth, order_job, subtotal, discount, deliv_fee, charge, use_point, add_point, tax, total, payment_total, deliv_id, payment_method, note, status, create_date, create_date, commit_date, device_type_id, (SELECT COUNT(shipping_id) as shipping_target_num FROM dtb_shipping WHERE dtb_shipping.order_id = dtb_order.order_id), (SELECT GROUP_CONCAT(shipping_id SEPARATOR \',\') FROM dtb_shipping WHERE dtb_shipping.order_id = dtb_order.order_id) as shipping_ids FROM dtb_order WHERE del_flg = 0 ORDER BY update_date DESC']
[Native code: 1064]
[Native message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'smallint) = dtb_order.order_pref), order_addr01, order_addr02, order_sex, order_' at line 1]

Change History

comment:1 Changed 13 years ago by kotani

  • Description modified (diff)
  • Summary changed from [管理画面]顧客管理:MySQLの場合、顧客CSVダウンロードで構文エラー to [管理画面]顧客管理/受注管理:MySQLの場合、CSVダウンロードでSQL構文エラー

comment:2 Changed 13 years ago by AMUAMU

  • Owner changed from somebody to AMUAMU
  • Status changed from new to assigned

comment:3 Changed 13 years ago by AMUAMU

  • Status changed from assigned to closed
  • Resolution set to 修正済

r20327 にて修正。

Note: See TracTickets for help on using tickets.