What best practices should be followed when structuring and formatting SQL queries in PHP to improve readability and maintainability?

When structuring and formatting SQL queries in PHP, it is important to follow best practices to improve readability and maintainability. One way to achieve this is by breaking the query into multiple lines for better readability. Additionally, using indentation and proper spacing can make the query easier to understand. Finally, consider using prepared statements to prevent SQL injection attacks and improve performance.

// Example of a well-structured and formatted SQL query in PHP
$sql = "SELECT column1, column2
        FROM table
        WHERE condition = :condition";

$stmt = $pdo->prepare($sql);
$stmt->bindParam(':condition', $condition);
$stmt->execute();