Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/253.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Codeigniter,限制用户每天输入报告一次_Php_Postgresql_Codeigniter 3 - Fatal编程技术网

Php Codeigniter,限制用户每天输入报告一次

Php Codeigniter,限制用户每天输入报告一次,php,postgresql,codeigniter-3,Php,Postgresql,Codeigniter 3,我只是想知道有没有一种方法可以限制用户每天报告一次他拥有的每个项目? 例如,一个用户有两个正在进行的项目,在一天内,他必须每天报告一次每个项目的进度 <div class="table-responsive"> <table id="zero_config" class="table table-striped table-bordered display" style="width:100%"> <thead> <tr&g

我只是想知道有没有一种方法可以限制用户每天报告一次他拥有的每个项目? 例如,一个用户有两个正在进行的项目,在一天内,他必须每天报告一次每个项目的进度

<div class="table-responsive">
   <table id="zero_config" class="table table-striped table-bordered display" style="width:100%">
     <thead>
       <tr>
         <th>No.</th>
         <th>Project</th>
         <th>Aksi</th>
       </tr>
      </thead>
      <tbody>
      <?php 
      $i = 1;
      foreach($project as $row) { 
      ?>
      <tr>
        <td><?php echo $i++ ?>.</td>
        <td><?php echo $row->nama_project ?></td>
        <td><a href="<?php echo base_url('report/harian/'.$row->id_project) ?>" class="btn btn-primary btn-xs btn-block"><i class="fa fa-file-code"></i> Report</a></td>
       </tr>
       <?php } ?>
     </tbody>
    </table>
   </div>

非常感谢

你能发布代码吗?你可以在他们报告时检查身份,然后用报告id和当前日期存储,并检查相同id和报告的相同数据是否不允许报告。好的,我会试一试,然后我很抱歉@devsiodera,但我该如何设置该条件,抱歉
$this->db->select('*');
$this->db->from('project');
$this->db->join('user', 'user.id_user = project.pic', 'right');
$this->db->join('pegawai', 'pegawai.id_pegawai = user.id_pegawai', 'right');
$this->db->where('project.pic', $id);
$query = $this->db->get();
return $query->result();