Hi, im having some problems comparing values from a mysql database. I need to look in the database for places where my name collum contain the value word but not only word but all strings containg word. Am I able to use wildcards and then select like this:

mysql_query("SELECT * FROM mydb WHERE name = '*word*' ");

Thanks in advance.

    mysql_query("SELECT * FROM mydb WHERE name LIKE '%word%' ");

    % being the wildcard

      Write a Reply...