So I have a table with a field that I wish to work with in a mySQL database. It's function is a long list of keywords used for fulltext search so the field is rather long.
For example:
Table
'data_index'
shirt t-shirt list item red black brown green purple sleeveless...etc for about 20 lines
I would like to match a separate string, lets define as:
$string = "teeshirt shert shertt shirtt";
I would like to ADD these items in $string to the list without having to grab the entire value in each data_index field. Essentially I don't want to have to use the UPD开发者_JAVA技巧ATE sql command and use the entire data_index value in this query. Is this possible?
UPDATE tablename SET data_index = CONCAT(data_index, 'your new keywords') WHERE ...
精彩评论