i am doing this query for a table and i dont want to include the rows which contain certain words,

if you are wondering how you can do a query with multiple not like in your msyql php scripts, i will show you my mistake and maybe you can learn from it.

this is how i had my query:

$query = "SELECT * my_table WHERE lastname NOT LIKE '%doe%' OR NOT LIKE '%john%'";

but this is how it should have been:

$query = "SELECT * users WHERE lastname NOT LIKE '%smith%' OR lastname NOT LIKE '%johnson%'";

the above query does a search but it ignores the people in my users table with the last names as smith or johnson

you see the mistake i made?