blood Posted May 3, 2004 Report Share Posted May 3, 2004 numa query...select * from ... where titulo LIKE '%$var%'porque o uso dos %?vlws... Quote Link to comment Share on other sites More sharing options...
0 Eddie_666 Posted May 3, 2004 Report Share Posted May 3, 2004 para substituir por qualquer coisa que apareça antes e depois da variavel ai no teu caso. se usasse $var% seria qualquer palavra iniciando por $var Quote Link to comment Share on other sites More sharing options...
0 blood Posted May 3, 2004 Author Report Share Posted May 3, 2004 hum.. pela lógica se fosse %$var seria qualquer palavra terminado por $var? Quote Link to comment Share on other sites More sharing options...
0 Eddie_666 Posted May 3, 2004 Report Share Posted May 3, 2004 exato Quote Link to comment Share on other sites More sharing options...
0 Sperto_Rox Posted May 3, 2004 Report Share Posted May 3, 2004 não q terminasse em $var ... alguma palavra q conteria $var .... estou errado? Quote Link to comment Share on other sites More sharing options...
0 Illidan Posted May 3, 2004 Report Share Posted May 3, 2004 É que ele falou %$var , e não %$var% , entendeu? Então, nesse caso, seria mesmo qualquer palavra terminando por $var Quote Link to comment Share on other sites More sharing options...
Question
blood
numa query...
select * from ... where titulo LIKE '%$var%'
porque o uso dos %?
vlws...
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.