views:

130

answers:

1

I have a database table that contain two fields "Categories" and "Tags"

i need to create a third field lets say called Keywords as the result of combining both categories and tags

so $Keywords = $tags." ".$categories;

can you help me please on how to achieve this

thanks

+2  A: 

You can do this purely in SQL:

alter table Mytable add column Keywords varchar(255);
update Mytable set Keywords = concat(Categories, ' ', Tags);
Asaph