title: MySql query doesn't work in php
body: <pre><code>public static function cantPaginas($asignatura, $codEstudiante)
  {        
      $query="SELECT * FROM nota WHERE Asignatura=".$asignatura." AND codEstudiante=".$codEstudiante;
      $res=mysql_query($query);
      $num_filas=mysql_num_rows($res);
      if($num_filas&gt;0)
      {
          $num_regs_x_p=16;
          $paginas=ceil($num_filas/$num_regs_x_p);
          for($x=0;$x&lt;$paginas;$x++)
          {
              echo"&lt;a href='?materia=".$asignatura."&amp;page=".($x+1)."'&gt;".($x+1)."&lt;/a&gt;";
              return 1;
          }
      }
      else
      {return 0;}
  }
  </code></pre>
  
  <p>This is basically my query. I know I'm missing two pairs of quotes but when I put them and output the query, it doesn't show anything. But when I remove the quotes, I can see it.</p>
  
  <p>Unfortunately I know that the query won't work without these quotes but when I put them it's like the variable is empty or bugged or i really don't know.</p>
  
  <p>It doesn't show any error table from php…just doesn't run the process correctly.</p>