mysql - concat rows in 2nd table of query -
I thought that a SQLfield has been created here!
I am running the following tables on 2 tables (the second internal has already been added):
select c.name, c.custom_message, d.log_id , C.price, c.quantity, d.value to wp_wpsc_cart_contents c JOIN wp_wpsc_submited_form_data d.log_id = c.purchaseid where c.name name '% $ word%' as c.name
In the first table, I need all the data in single rows, but in the second table, the data is spread over 6 rows in a column. This results in 6 instances of the same data in the table. How can I process data in Table 2 to eliminate duplication?
Screenshot of Table 2
Use
GROUP_CONCAT
: select wp_wpsc_cart_contents.name, wp_wpsc_cart_contents.custom_message, wp_wpsc_submited_form_data.log_id, wp_wpsc_cart_contents.price, wp_wpsc_cart_contents.quantity, GROUP_CONCAT (wp_wpsc_submited_form_data value) wp_wpsc_cart_contents where wp_wpsc_submited_form_data.log_id = wp_wpsc_cart_contents.purchaseid on wp_wpsc_submited_form_data join interiors like wp_wpsc_cart_contents.name '% $ term % 'Wp_wpsc_submitted_form_data.log_id command by group wp_wpsc_cart_contents.name
< In areas such as price / P>
Comments
Post a Comment