1

Тема: Слияние двух ячеек

нужно дописать в конце ячейки текст из другой ячейки
сделать выборку для меня не составило проблем
SELECT `res_product_description`.`description` , `res_product_description`.`product_id` , `res_product_description`.`language_id` ,`res_product_tab_content`.`content` , `res_product_tab_content`.`product_id` , `res_product_tab_content`.`language_id`
FROM `res_product_description` ,`res_product_tab_content`
WHERE `res_product_description`.`language_id` = `res_product_tab_content`.`language_id` AND`res_product_description`.`product_id` = `res_product_tab_content`.`product_id`

мне нужно в `res_product_description`.`description` дописать `res_product_tab_content`.`content`
Особо благодарен за помощь

2

Re: Слияние двух ячеек

Используйте объединение строки функцией CONCAT(). При необходимости, измените данные запросом UPDATE.

CONCAT(`res_product_description`.`description`, `res_product_tab_content`.`content`)

3

Re: Слияние двух ячеек

Hanut сказал:

Используйте объединение строки функцией CONCAT(). При необходимости, измените данные запросом UPDATE.

CONCAT(`res_product_description`.`description`, `res_product_tab_content`.`content`)

очень благодарен вам за быстрый ответ, не могли бы вы мне ето сделать за денежное вознаграждения?

4

Re: Слияние двух ячеек

Сохраните исходные данные перед экспериментами.

Выполните запрос объединяющий два поля через пробел:

UPDATE `res_product_description`, `res_product_tab_content`
SET `res_product_description`.`description` = CONCAT(`res_product_description`.`description`, " ", `res_product_tab_content`.`content`)
WHERE `res_product_description`.`language_id` = `res_product_tab_content`.`language_id` AND`res_product_description`.`product_id` = `res_product_tab_content`.`product_id`

5

Re: Слияние двух ячеек

Все получилось! Благодарю  roll