In the provided code, what potential issues can arise when using the OR operator in the WHERE clause of a SQL query?

When using the OR operator in the WHERE clause of a SQL query, there is a potential issue of unintentionally returning more results than expected. This can happen when the OR condition is not properly grouped with parentheses, leading to unexpected logical evaluations. To solve this issue, always use parentheses to explicitly define the logical order of operations in the WHERE clause when combining multiple conditions with OR.

$query = "SELECT * FROM table_name WHERE (condition1 OR condition2)";