Are there any potential drawbacks to directly incorporating stristr into a mysqli query?

Directly incorporating `stristr` into a mysqli query can potentially lead to SQL injection vulnerabilities if the input is not properly sanitized. To solve this issue, it is recommended to use prepared statements with bound parameters to prevent SQL injection attacks.

// Example of using prepared statements with bound parameters to prevent SQL injection
$searchTerm = $_GET['searchTerm'];

// Create a prepared statement
$stmt = $mysqli->prepare("SELECT * FROM table WHERE column LIKE ?");
if ($stmt) {
    // Bind the search term as a parameter
    $stmt->bind_param("s", $searchTerm);
    
    // Execute the statement
    $stmt->execute();
    
    // Fetch results
    $result = $stmt->get_result();
    
    // Process the results
    while ($row = $result->fetch_assoc()) {
        // Process each row
    }
    
    // Close the statement
    $stmt->close();
}