php - MySQL Count multiple values in same column -


i have script storing user generated tags ('keywords') in database each added video upload, places multiple keywords per item in same keyword column, space separated. i'm not sure how can counted correctly. i'm no expert.

i have table called 'video', within it

vid      keyword   ------   ----------- 1        cars  2        cars audi  3        boats  4        trains   5        aircraft   

is there way set spaced value counted separately?

if

select keyword video order keyword asc limit 200 

it returns

1. aircraft  2. boats  3. cars audi   4. trains 

is there way have return;

1. aircraft 2. audi 3. boats 4. cars  5. trains  

and individually recognize multiple spaced keywords in columns.

thanks!

try :

 select vid, substring_index(keyword, ' ', -1)  item1  video  group item1   order item1 

demo here


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -