0

click for image

hi I want to split mysql search result. I've added a sample image for the table. I want to select values word by word from adi field.

mysql:

select * from liste like %emlak%

Result:

emlak1 emlak2 emlak3

I've used substring ets.. but it didn't work

SELECT 
  *, 
  sum((length(adi)-length(replace(adi,' ',''))+1)) as bosluk 
FROM liste2  
where adi like '%emlak%'
Wosi
  • 37,479
  • 15
  • 72
  • 76

1 Answers1

0

maybe...

 SELECT liste2.*,
        sum((length(adi)-length(replace(adi,' ',''))+1)) as bosluk
   FROM liste2
  WHERE adi like '%emlak%'

add tablename or alias