Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/285.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 删除显示未定义常量classid使用错误的记录-asumed';classid&x27;_Php_Mysql - Fatal编程技术网

Php 删除显示未定义常量classid使用错误的记录-asumed';classid&x27;

Php 删除显示未定义常量classid使用错误的记录-asumed';classid&x27;,php,mysql,Php,Mysql,删除记录“未定义常量classid-asumed'classid'时出错” 这是查询代码 <?php $query = "SELECT `add_class`.`class_id` AS classid,`add_class`.`class` AS class_title, COUNT(*) AS 'total' FROM `add_class` INNER JOIN `add_sec_class` ON (`add_class`.cl

删除记录“未定义常量classid-asumed'classid'时出错”

这是查询代码

         <?php

                $query = "SELECT `add_class`.`class_id` AS classid,`add_class`.`class` AS class_title, COUNT(*) AS 'total' FROM `add_class`  INNER JOIN `add_sec_class` ON (`add_class`.class_id = `add_sec_class`.class) GROUP BY `class_title` HAVING COUNT(*) >= 1";

                include("include/my_pagina_class.php");
                $test = new MyPagina;
                $test->sql = $query; // the (basic) sql statement (use the SQL whatever you like)
                $test->rows_on_page = 50;
                $result = $test->get_page_result(); // result set
                $num_rows = $test->get_page_num_rows(); // number of records in result set
                $nav_links = $test->navigation(" | ", "currentStyle"); // the navigation links (define a CSS class selector for the current link)
                $nav_info = $test->page_info("to"); // information about the number of records on page ("to" is the text between the number)
                $simple_nav_links = $test->back_forward_link(); // the navigation with only the back and forward links
                $total_recs = $test->get_total_rows(); // the total number of records
                //echo $errNo;
                $rowCount = 1;
                $listRows = $total_recs;
                $counter = 1;
                while($row = mysql_fetch_array($result))
                {
                      $counter++;

              ?>
                <tr>
                  <td height="22" align="center"><input type="checkbox" name="CheckBoxChild" id="CheckBoxChild" value="<?=$row[classid]?>" onclick="SelectChildCheckBox(this.form,'CheckBoxParent','CheckBoxChild');" /></td>

                  <td><?=$row['class_title']?></td>
                  <td><?=$row['total'] ?></td>
                  <td></td>
                  <td></td>
                  <td><a href="<?=$_SERVER['PHP_SELF']?>?id=<?=$row[classid].''.rebuild_qstring("id")?>">Edit</a></td>
                </tr>
              <?php }?>

这些是我的桌子

表1名称“添加第二类” 列包括:d_id、类别、部门、ddate、用户名、ACAdminc_年份、状态

表2名称“添加类” 列包括:班级id、班级、行政年度、状态、显示顺序、费用

现在我应该写什么来代替$row[classid],我不确定查询中需要什么样的更改


提前感谢您宝贵的时间

$row[classid]应该是$row['classid']我也试过了,但在您的查询中出现了相同的错误:classid应该是
''classid'
,class\u title应该是
''class\u title'
查询中的每个字段都必须有这个符号
'
太棒了!它现在运转良好。非常感谢:)$row[classid]应该是$row['classid']我也试过了,但在你的查询中出现了同样的错误:classid应该是
''classid'
,class_title应该是
''class_title'
查询中的每个字段都必须有这个符号
'
太棒了!它现在运转良好。非常感谢:)