我现在不知道为什么在此sql请求中有错误

时间:2018-12-14 07:48:49

标签: mysql sql mysqli

UPDATE `vjprf_jshopping_manufacturers` 
SET `meta_title_en-GB`='Buy products from the manufacturer '.`name_en-GB`.' 
in Ukraine at wholesale prices | Deps' WHERE `manufacturer_id`=3

我需要在name_en-GB =“某些文本(meta_title_en-GB)一些文本”中插入place to insert name_en-GB

错误号#1064

1 个答案:

答案 0 :(得分:1)

点在PHP中用于字符串连接。在MySQL中使用CONCAT函数:

UPDATE vjprf_jshopping_manufacturers
SET meta_title_en-GB = CONCAT('Buy products from the manufacturer ', name_en-GB,
    ' in Ukraine at wholesale prices | Deps')
WHERE
    manufacturer_id = 3;