Why is it recommended to avoid using "SELECT *" in SQL queries and what potential issues can arise from it?

Using "SELECT *" in SQL queries is not recommended because it can lead to performance issues and make the query less maintainable. It is better to explicitly list out the columns you need in the SELECT statement to improve readability and avoid unnecessary data retrieval.

// Avoid using "SELECT *"
$query = "SELECT * FROM table_name";

// Instead, specify the columns you need
$query = "SELECT column1, column2, column3 FROM table_name";