title: How to make SQL query more readable in PHP?
body: <p>When you have a long fields in SQL query, how do you make it more readable?</p>
  
  <p>For example:</p>
  
  <pre><code>public function findSomethingByFieldNameId($Id) {
          $sql = "SELECT field1, field2, field3 as Field3_Something, field4, field5, field6, field7, field8, field9
                        FROM table
                 JOIN table2 AS TNS ON TNS.id = table.id
                        WHERE something = 1";
   return $this-&gt;db-&gt;fetchData($sql, null, 'all');
      }
  </code></pre>