Jump to content

Fatal error: Uncaught Error: Call to a member function fetch_assoc() on bool


cheator
 Share

Go to solution Solved by cheator,

Recommended Posts

  • Solution

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>

Link to comment
Share on other sites

  • requinix changed the title to Fatal error: Uncaught Error: Call to a member function fetch_assoc() on bool

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • 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.