hello friends I want to update a cell in a table whit new content, but retaining the content that has. I need to add the new data separated whit comma or line break (is'nt relevant), preserving the data that have inside.
|id | title | referer|
|--------------------|
| 1 | post1 | google |
| 2 | post2 | yahoo |
| 3 | post3 | bing |
| 4 | post4 | google |
The table should look like this with new content added.
|id | title | referer |
|-------------------------------|
| 1 | post1 | google,yahoo,bing |
| 2 | post2 | yahoo,bing,etc |
| 3 | post3 | bing |
| 4 | post4 | google,google |
this is my code to insert new rows in my Database:
mysql_query("INSERT IGNORE INTO posts (id,title,referer) VALUES (null,'$q','$referer')");
What would be the code to add information in the cell "referer" whit Comma separated or line break ?
thanks in advance
titlehas duplicates) to which row you want to add a referrer?