1
Well I need a SELECT that returns all the lines that contain the name "maria", I have in a column the values and I want a select that shows me all the lines that have the word "maria" in that column.
Example, in a given column I have the values:
1) (Joana;Rla;Josefa)
2) (Greece; Mary; Julia)
3) (maria;Carol;Jaqueline)
SELECT needs to return me the lines of 2 and 3 that possess "maria"
Need to do a filtering in php and list certain data of these lines
What have you ever tried to do ?
– NoobSaibot
select * from cms_news Where Author like "%maria%", only it is not effective because it shows everyone that has the snippet maria in the name
– Giovany Henrique
And isn’t that what you need ? Because that’s what you’re talking about in the question! Look at this example I did on sqlfiddle
– NoobSaibot
I’ll signal to close to ask, because if that’s all, you’re doing it right, unless you’re finding some problem, so edit your question and make a better description of your question or problem. Questions read What it means if a question is "closed" or "pending"?.
– NoobSaibot
Already solved, I was wrong anyway. Thank you for the strength
– Giovany Henrique
Set the resolution Homi
– Danillo Victtor
Hello @Giovanyhenrique, I have a way that is possible to search column by column, but in SQL SERVER, which BD you are using?
– Ricardo Souza
The way I did was to put a character before and after the name of the person, so the sql of the post came out correct, example, instead of by "maria" I put ";maria;", and when I went to display I took the ";", since only I will see that it has the semicolons, so that’s fine.
– Giovany Henrique