• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mysql queries sometimes appear sometimes disappear

Hello! I have a problem when displaying data on the main page, which sometimes appears and disappears. Like this :

[Image: lSmYB.png]

This is the code index.php :

include_once 'function/core.php';
$hdr = select('nama_kehadiran, warna', 'tbl_kehadiran');

$cekmgg = date("d");
$xyz = $cekmgg%2;
<!DOCTYPE html>
    <meta charset="utf-8">
    <title>Jadwal Hari ini</title>
  <link rel="stylesheet" href="<?= base('assets/css/style.css'); ?>" media="screen" title="no title">
  <link rel="stylesheet" href="<?= base('assets/css/bootstrap.css'); ?>" media="screen" title="no title">
  <link rel="stylesheet" href="<?= base('assets/jquery.simplyscroll/jquery.simplyscroll.css'); ?>" media="screen" title="no title">
  <link rel="shrotcut icon" href="<?= base('images/favicon.png'); ?>">
  <script type="text/javascript" src="<?= base('assets/js/jquery.js'); ?>"></script>
  <script type="text/javascript" src="<?= base('assets/js/bootstrap.min.js'); ?>"></script>
  <script type="text/javascript" src="<?= base('assets/jquery.simplyscroll/jquery.simplyscroll.min.js'); ?>"></script>
  <script type="text/javascript">
    $(document).ready(function() {
        customClass: 'simply-scroll',
        frameRate: 15,
        speed: 10,
        pauseOnHover: false,
  <body style="background:url('images/pattern.png');background-attachment:fixed;">
    <nav class="navbar navbar-default navbar-fixed-top" style="background:#109618 !important;color:#fff !important;box-shadow: 0px 0px 5px #222;">
      <div class="container">
        <div class="navbar-header">
          <a href="#" class="navbar-brand"><img src="<?= base('images/main-logo.png'); ?>" width="175px" alt="" class="img img-responsive"></a>
        </div> <!-- end of class navbar-header -->
        <div class="collapse navbar-collapse navbar-right">
          <ul class="nav navbar-nav">
              <h4 style="padding-top:7px;margin-right:-80px;">
                $hari = date('w');
                $tgl    = date('Y-m-d');
                echo hari($hari).', '.tglskrg($tgl); ?>
        </div> <!-- end of class collapse -->
      </div> <!-- end of class container -->

    <div class="container-fluid" id="main-content">
        <div class="row">
          <div class="col-md-9" style="background-image: url('images/pattern.png') !important;padding-right: 0px;padding-left: 5px;">
            <table class="table table-striped">
                  <th class="ctr" width="120px">Jam</th>
                  <th class="ctr" width="275px">Guru</th>
                  <th class="ctr" width="400px">Mata Pelajaran</th>
                  <th class="ctr">Kelas</th>
                  <th class="ctr">Ket.</th>
            <ul id="scroller">
                <?php include 'templates/content.php'; ?>
          <div class="col-md-3" style="padding-right: 5px;">
            <div class="panel panel-primary">
              <div class="panel-heading">
              <div class="panel-body">
                  $annc = select('*','tbl_lain', "id=1 LIMIT 1");
                  $p = mysqli_fetch_assoc($annc);
                  echo $p['isi'];
              </div> <!-- end of class panel-body -->
            </div> <!-- end of class panel-primary -->

            <div class="panel panel-primary">
              <div class="panel-heading">
                Keterangan :
              <div class="panel-body">
                <table class="table">

                <?php while ($hd = mysqli_fetch_assoc($hdr)) : ?>

                      <div style="width:30px;height:30px;background:#<?= $hd['warna'];?>"></div>
                    <td><?= $hd['nama_kehadiran']; ?></td>

                <?php endwhile; ?>

          </div> <!-- end of class col-md-3 -->
        </div> <!-- end of class row -->
    </div> <!-- end of class container or ID main-content -->

<?php include_once 'templates/footer.php'; ?>

What is the problem and how to solve it? Thank you in advance.


Are you seeing any error messages? In the console?

You should also move your JavaScript to the end of your html just above </body> </html>
for faster page loading.

As @php_rocs states you can hit the F-12 key in your web browser to bring up the developer
tools then make sure it's on the console tab.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

(09-16-2020, 12:37 PM)php_rocs Wrote: @adamfr28,

Are you seeing any error messages? In the console?
No errors.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.