What are the potential pitfalls of using single quotes versus double quotes in PHP when constructing MySQL queries?

Using single quotes in PHP when constructing MySQL queries can lead to issues when trying to include variables within the query, as PHP does not parse variables within single quotes. To avoid this problem, it is recommended to use double quotes when constructing queries to allow for variable interpolation.

// Using double quotes for constructing MySQL queries
$variable = "example";
$query = "SELECT * FROM table WHERE column = '$variable'";