title: MySQL - Php, returns "Unexpected end of input"
body: <p>I have a <em>PHP</em> function that do the next steps: </p>
  
  <pre><code>$conecta = new Conexion();
     $sql = "SELECT `id_sala`, COUNT(`num_horas`) AS numero, `Fecha` FROM `registros_estudio` WHERE 1 GROUP BY YEAR (`Fecha`);"
      $r = $conecta-&gt;query($sql);
      $registros = array();
      while ($row = $r-&gt;fetch_array(MYSQL_ASSOC)) {
          $registros[]= $row;
      }
      $conecta-&gt;close();
      return $registros;
  </code></pre>
  
  <p>It´s just a simple <code>SELECT</code> and it works fine, but when I change my <em>SQL</em> sentence to this </p>
  
  <pre><code>   $conecta = new Conexion();
  $sql = "SELECT registros_estudio.id_sala, COUNT(num_horas) AS numero, Fecha, provincia_estado.nombre FROM registros_estudio, salas_estudio, provincia_estado WHERE salas_estudio.id_sala = registros_estudio.id_sala AND salas_estudio.provincia_estado = provincia_estado.id_provincia_estado GROUP BY YEAR (Fecha);";
      $r = $conecta-&gt;query($sql);
      $registros = array();
      while ($row = $r-&gt;fetch_array(MYSQL_ASSOC)) {
          $registros[]= $row;
      }
      $conecta-&gt;close();
      return $registros;
  </code></pre>
  
  <p>This returns me an error like  </p>
  
  <blockquote>
    <p>Unexpected end of input.</p>
  </blockquote>
  
  <p>Both <em>SQL</em> sentences were tested and are working </p>