Dizenin başka bir dize içeriyorsa edin

0 Cevap php

In php is there a way i can check if a string includes a value. Say i had a string "this & that", could i check if that included "this". Thanks

GÜNCEL:

$ U adı oturumu =

function myLeagues2($u)
{
     $q = "SELECT * FROM ".TBL_FIXTURES." WHERE `home_user` = '$u' GROUP BY `compname` ";
   return mysql_query($q, $this->connection);

}

That code returns if there is an exact match in the database. But i put two usernames together like "username1 & username2" and need to check if the username session is present in that field.

Bunu yapmak için bir yol olduğunu? Açıkçası bunu eşit woudn't.

BİR GÜNCELLEME:

I sql gibi% username% kullanırsanız onun sadece adı ise, o görünecektir. Yani yerine Luke & Matt vizyonda, çok onun sadece Luke olacağını göstermek olur? Ben sadece öyle şeyler istiyorum, bu istemiyorum. Eğer! Koymak = ve GİBİ yüzden sadece aynı benzer eşleşmeleri olsun ama değil mi?

Şerefe

0 Cevap