I need to search through a MYSQL table for any string that may or not be in a row and print it out on screen. I could easily do this with python but I am still learning PHP and it's way different and am unfamiliar with how it's done here.
The row have multiple sets of words separated by commas so I need to use LIKE for any word that matches $string
$string = 'text';
$db = mysqli_connect("localhost", "root", "", "data");
$result = mysqli_query("SELECT row FROM table WHERE row LIKE '%$string%'");
if($string == $result){
echo "String found";
}else{
echo "No string found!";
}