0

我正在使用 phpmydatagrid 来显示许多表格。
为了确定哪个表,我使用 GET。
这是类:http
://www.phpclasses.org/browse/file/18544.html javascript部分:http
://www.phpclasses.org/browse/file/18559.html 这是我的代码的一部分:

include ("phpmydatagrid.class.php");
$objGrid = new datagrid;
$getId = $_GET['id'];
$tablename = "xxx_$getId";
//Some code here...
$objGrid -> tabla($tablename); //This is how you set the table using the class

该表显示正确,如果我回显 $objGrid->tablename 我得到正确的表名。
但是,当您尝试使用接口添加新行时,表名突然变为“xxx_”而没有 id。
我查看了课程代码,没有任何地方改变了“表名”。对于查询,只需在类中搜索“INSERT INTO”。
我希望我说得足够清楚,类文件也可以帮助您理解。

4

0 回答 0