PDA

View Full Version : Update a cell


cancer10
11-25-2007, 02:11 AM
Hi!

How do I update a cell of a row which is of a varchar datatype?

For example:

I have a table name, tbl_online_users


and have a column in it, users_online

I would like to update a cell with all users who are online in the following way

Joe, Mark, Peter


I have tried the following query, but it wont work

UPDATE table tbl_online_users SET users_online=users_online + ', Adam'

Fumigator
11-25-2007, 11:24 AM
concat()

But I must tell you, that is terrible database design.

cancer10
11-25-2007, 11:30 AM
Which is a terrible database design?