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!";
}
$resultwill contain the result object, and not the actual result value.SELECT row FROM table WHERE row = '$string'?FIND_IN_SET(). See stackoverflow.com/questions/28639692/…mysqli. You're missing the connection argument, and you need to callmysqli_fetch_assoc()to get the rows of results.