PHP - I do not work fetch_all (MYSQLI_ASSOC)

0

Fatal error: Uncaught Error: Call to undefined method mysqli_result :: fetch_all () in C: \ MAMP \ htdocs \ gdlwebcamp \ index.php: 76 Stack trace: # 0 {main} thrown in C: \ MAMP \ htdocs \ gdlwebcamp \ index.php on line 76

  getMessage ();                             }                         ? >
                    <?php $conn->multi_query($sql); ?>

                    <?php
                        do {
                          $resultado = $conn->store_result();
                          $row = $resultado->fetch_all(MYSQLI_ASSOC); ?>

                          <?php $i = 0; ?>
                          <?php foreach ($row as $evento): ?>
                              <?php if($i % 2 == 0) { ?>
                                <div id="<?php echo strtolower($evento['cat_evento']) ?>" class="info-curso ocultar clearfix">
                              <?php } ?>
                                      <div class="detalle-evento">
                                          <h3><?php echo utf8_encode($evento['nombre_evento']) ?></h3>
                                          <p><i class="fa fa-clock-o" aria-hidden="true"></i> <?php echo $evento['hora_evento']; ?></p>
                                          <p><i class="fa fa-calendar" aria-hidden="true"></i> <?php echo $evento['fecha_evento']; ?></p>
                                          <p><i class="fa fa-user" aria-hidden="true"></i> <?php echo $evento['nombre_evento']; ?></p>
                                      </div>

                                      <a href="#" class="button float-right">Ver todos</a>
                              <?php if($i % 2 == 1): ?>
                                </div> <!--#talleres-->
                              <?php endif; ?>
                          <?php $i++; ?>
                        <?php endforeach; ?>
                        <?php $resultado->free(); ?>
                      <?php } while ($conn->more_results() && $conn->next_result()); ?>
    
asked by Bauti 29.04.2018 в 04:17
source

0 answers