Php Codeigniter-DataTables警告(表id=';DataTables_表0';):请求的未知参数';0';来自行的数据源
我试图将数据库中的值填充到PHP页面中,但是,每当页面加载数据时,我都会收到此弹出错误消息。 填充的值都是正确的,但是这个弹出窗口永远不会消失。非常感谢您事先的帮助 错误消息 DataTables警告(表id='DataTables\u table\u 0'):从数据源为行请求了未知参数“0” PHPPhp Codeigniter-DataTables警告(表id=';DataTables_表0';):请求的未知参数';0';来自行的数据源,php,mysql,codeigniter,hmvc,Php,Mysql,Codeigniter,Hmvc,我试图将数据库中的值填充到PHP页面中,但是,每当页面加载数据时,我都会收到此弹出错误消息。 填充的值都是正确的,但是这个弹出窗口永远不会消失。非常感谢您事先的帮助 错误消息 DataTables警告(表id='DataTables\u table\u 0'):从数据源为行请求了未知参数“0” PHP <div class="box-content"> <table class="table table-striped table-bordered bootst
<div class="box-content">
<table class="table table-striped table-bordered bootstrap-datatable datatable">
<thead>
<tr>
<th>Count</th>
<th>Color</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
$count = 0;
foreach($query->result() as $row) {
$count++;
$delete_url = base_url()."store_item_colors/delete/".$row->id;
?>
<tr>
<td><?= $count ?></td>
<td class="center"><?= $row->color ?></td>
<td class="center">
<a class="btn btn-danger" href="<?= $delete_url ?>">
<i class="halflings-icon white trash"></i>Remove Option
</a>
</td>
</tr>
<?php
}
?>
<tr>
</tbody>
</table>
</div>
计数
颜色
行动
控制器
<?php
class Store_item_sizes extends MX_Controller
{
function __construct() {
parent::__construct();
}
function update($update_id) {
// only those people with an update_id for an item can get in.
if (!is_numeric($update_id)) {
redirect('site_security/not_allowed');
}
// fetch existing options for this item
$data['query'] = $this->get_where_custom('item_id', $update_id);
$data['num_rows'] = $data['query']->num_rows();
$data['headline'] = "Update Item Sizes";
$data['update_id'] = $update_id;
$data['flash'] = $this->session->flashdata('item');
$data['view_file'] = "update";
$this->load->module('templates');
$this->templates->admin($data);
}
您能为控制器编写一段代码吗?请在代码块中格式化它。;)这里很难读,我正在检查,请稍候,在这两个变量$count和$delete_url后面放分号。试着让我知道谢谢,这些代码实际上来自David Connelly的一个教程-你能给你的控制器编一段代码吗?请在代码块中格式化它。;)这里很难读,我正在检查,请稍候,在这两个变量$count和$delete_url后面放分号。请告诉我谢谢,这些代码实际上来自David Connelly的教程-