Jump to content

cheator

New Members
  • Posts

    1
  • Joined

  • Last visited

Community Answers

  1. cheator's post in Fatal error: Uncaught Error: Call to a member function fetch_assoc() on bool was marked as the answer   
    Fatal error: Uncaught Error: Call to a member function fetch_assoc() on bool in C:\xampp\htdocs\olshop\admin\produk.php:18 Stack trace: #0 C:\xampp\htdocs\olshop\admin\index.php(59): include() #1 {main} thrown in C:\xampp\htdocs\olshop\admin\produk.php on line 18
     

    <table class="table table-bordered">
        <thead>
            <tr>
                <th>No</th>
                <th>Nama</th>
                <th>Harga</th>
                <th>foto</th>
                <th>Deskripsi</th>
                <th>Aksi</th>
            </tr>
        </thead>
        <tbody>
        <?php 
        $ambil=$koneksi->query('SELECT * FROM produk'); ?>
        <?php 
        while($pecah = $ambil->fetch_assoc()){ ?>
            <tr>
                <td>a</td>
                <td>a<?php echo $pecah['nama_produk']; ?></td>
                <td>a</td>
                <td>a</td>
                <td>a</td>
                <td>a</td>
            </tr>
        <?php } ?>
        </tbody>
    </table>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.