What are the recommended ways to rewrite SQL queries in PHP applications to adhere to standard JOIN conditions in SQL 5 for improved compatibility and performance?

When rewriting SQL queries in PHP applications to adhere to standard JOIN conditions in SQL 5 for improved compatibility and performance, it is important to use explicit JOIN syntax instead of implicit joins. This means specifying the join conditions in the ON clause rather than in the WHERE clause. This not only makes the query more readable but also helps the database optimizer to better optimize the query execution.

$query = "SELECT * 
          FROM table1 
          JOIN table2 ON table1.id = table2.table1_id 
          WHERE table1.column = 'value'";

$result = $pdo->query($query);