Php openjsgridmasterv2和mysql

Php openjsgridmasterv2和mysql,php,Php,我在“字段列表”中得到错误未知列“first.”。我有一个名为“try”的数据库,一个名为“first”的表,其中包含字段“id(int)”和“name(char)”。这只是我用来在网格中显示其数据的一个示例表,但我得到了这个错误。我对这些默认html和ajax文件进行了如下编辑: Index.php <!DOCTYPE html> <link rel="stylesheet" href="bootstrap/css/bootstrap.css"/> <lin

我在“字段列表”中得到错误
未知列“first.”
。我有一个名为“try”的数据库,一个名为“first”的表,其中包含字段“id(int)”和“name(char)”。这只是我用来在网格中显示其数据的一个示例表,但我得到了这个错误。我对这些默认html和ajax文件进行了如下编辑:

Index.php

<!DOCTYPE html>


<link rel="stylesheet" href="bootstrap/css/bootstrap.css"/>

<link rel="stylesheet" href="grid.css" title="openJsGrid"/>
<!--<link rel="stylesheet" href="jquery-ui/css/smoothness/jquery-ui-                          1.8.22.custom.css"/>-->
<script src="jquery.js" type="text/javascript"></script>
<!--<script src="jquery-ui/js/jquery-ui-1.8.22.custom.min.js" type="text/javascript">   </script>-->
<script src="root.js"></script>
<script src="grid.js"></script>

<script >
$(function() {
$(".users").grid();
});

</script>

</head>
<body>
<h2>Users</h2>
<table class="grid users" action="ajax.php">
    <tr>
                        <th col="id" type="text">ID</th>
        <th col="name" type="text">Name</th>
    </tr>
</table>

</body>
<?php
// connect to db
mysql_connect("localhost","root","");
mysql_select_db("try");

// require our class
require_once("grid.php");
$grid = new Grid("first", array(
"save"=>true,
"delete"=>true
 ));

 ?>

$(函数(){
$(“.users”).grid();
});
使用者
身份证件
名称
Ajax.php

<!DOCTYPE html>


<link rel="stylesheet" href="bootstrap/css/bootstrap.css"/>

<link rel="stylesheet" href="grid.css" title="openJsGrid"/>
<!--<link rel="stylesheet" href="jquery-ui/css/smoothness/jquery-ui-                          1.8.22.custom.css"/>-->
<script src="jquery.js" type="text/javascript"></script>
<!--<script src="jquery-ui/js/jquery-ui-1.8.22.custom.min.js" type="text/javascript">   </script>-->
<script src="root.js"></script>
<script src="grid.js"></script>

<script >
$(function() {
$(".users").grid();
});

</script>

</head>
<body>
<h2>Users</h2>
<table class="grid users" action="ajax.php">
    <tr>
                        <th col="id" type="text">ID</th>
        <th col="name" type="text">Name</th>
    </tr>
</table>

</body>
<?php
// connect to db
mysql_connect("localhost","root","");
mysql_select_db("try");

// require our class
require_once("grid.php");
$grid = new Grid("first", array(
"save"=>true,
"delete"=>true
 ));

 ?>

我最近调用了一个辅助php变量,遇到了这个问题,我忘记了一个引号。我的一个脚本指向数据库中的一个字段,名为-字面上的->.field

在主脚本和辅助脚本中,在单词“first”周围打上引号

<textarea> ' . $first. (MISSING A ' HERE) </textarea>
”$第一。(此处缺少“A”)
应该是

<textarea>  ' . $first . '  </textarea>
”$首先。”

您能添加一些细节吗?到目前为止你试过什么?你的搜索结果显示了什么?我已经用添加的详细信息更新了帖子。希望有帮助:)这没有意义。。你能详细说明一下这在他的代码中的位置吗?我是在回答问题的标题,其中包括错误消息本身,“Unknown column'first.”在“field list”中。某些脚本(显示的代码引用了两个我们没有明确代码的php脚本)正在从名为“first”的列中调用数据。该列不存在。问题似乎不在发布的代码中,而是在未显示的辅助脚本中。