php - Mysql REGEX Matching query -


what correct query match string variable mysql field? example:

$var_surname = $_post['surname']; $var_surname = strtolower($var_surname);  select surname tblname lower(surname) regex $var_surname .......... ..........  if($check > 0) {     surname exists }  else  {     successful } 

any appreciated.

i don't understand, why using regex (should regexp way) ? do

"select surname tblname lower(surname) = '$var_surname'" 

Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -