title: Why does my code have a Limit of 1 with writing it?
body: <p>I have a code who should read all the rows from a mysql database table.
  However, it doesn't show all the data from the table.</p>
  
  <p>The $array should contains all the rows , but contains only the first.</p>
  
  <p>I have three row in my module_cmds database</p>
  
  <pre><code>+--------+------+----+--------------------+
  | module | hash | id | serverId           |
  +--------+------+----+--------------------+
  | music  |    1 |  1 | 231870365863903232 |
  | rule34 |    1 |  2 | 231870365863903232 |
  | logs   |    1 |  3 | 231870365863903232 |
  +--------+------+----+--------------------+
  </code></pre>
  
  <p>FYI, count($reponses) = 1</p>
  
  <p>Try to change the ORDER BY</p>
  
  <p>FYI, The $array, is use previously in the code, but I don't think it change something</p>
  
  <pre class="lang-php prettyprint-override"><code>$array = array();
      $reponses = $bdd-&gt;query('SELECT * FROM module_cmds WHERE serverId=' . $donnees['server_id'] . ' ORDER BY module');
      while ($donnee = $reponses-&gt;fetch()){
                  $array_param = array();
                  $reponses = $bdd-&gt;query('SELECT * FROM module_params WHERE idModule=' . $donnee['id']);
                  while ($donne = $reponses-&gt;fetch()){
                          $array_param_in = array( 'param' =&gt; $donne['paramName'],
                                                          'value' =&gt; $donne['value']);
                          array_push($array_param,$array_param_in);
                  }
          $array_in = array( 'module' =&gt; $donnee['module'],
                          'hash' =&gt; $donnee['hash'],
                          'params' =&gt; $array_param);
          array_push($array,$array_in);
      }
  </code></pre>
  
  <p>For an ORDER BY module the answer is </p>
  
  <p><code>"modules":[{"module":"logs","hash":"1","params":[]}]</code></p>
  
  <p>For an ORDER BY id the answer is </p>
  
  <p><code>"modules":[{"module":"music","hash":"1","params":[]}]</code></p>
  
  <p>The answer should be </p>
  
  <pre><code>"modules":[{"module":"logs","hash":"1","params":[]},
             {"module":"music","hash":"1","params":[]},
             {"module":"rule34","hash":"1","params":[]},]```
  </code></pre>
  
  <p>I think the mistake come from the SQL, but </p>
  
  <pre class="lang-sql prettyprint-override"><code>'SELECT * FROM module_cmds WHERE serverId = 231870365863903232 ORDER BY module'
  </code></pre>
  
  <p>work fine.</p>
  
  <p>Where is my mistake ? Is it something that I don't know about array in Php ? Some typo ? Some line I forget ?</p>
  
  <p>FYI, I have a similar code where I don't go into in another SQL Table, and it work perfectly there.</p>