How to display content with the same property by one of the properties in the list
This is my list of topics, and one of the columns in my topic list is "status" to show "optional" or "not selectable". The current list shows all optional and non-selectable content. I want to add a feature, that is, by clicking on "Optional", the system automatically calls the database in the status of "optional" content, after clicking "Not selectable", the system can automatically call the database in the status of "not selectable" content.
##################### #课题列表 ##########################
Include "conn.php";
Include "header.php";
?>
<title>List of topics</title>
Project number |
Project name |
Teacher Guidance |
Title |
Optional number |
Selection of topics |
State |
Detailed information |
Extract ($_request);$n = 0;$query =mysql_query ("SELECT count (*) as SM from Jiaoshi");mysql_query ("Set names ' GB2312 '");$row =mysql_fetch_array ($query);$count = $row [' SM '];if (empty ($offset)){$offset = 0;}Echo $offset;$query =mysql_query ("SELECT * from Jiaoshi the ORDER by ID ASC limit $offset, $list _num") or Die ("fail");mysql_query ("Set names ' GB2312 '");while ($row =mysql_fetch_array ($query)) {if (($n%2)! = ' 0 ') {echo "
";} else{echo "
"; }if ($row [' Surplus ']==0) $ss = "not selectable"; else $ss = "optional"; Echo
". $row [' id ']." |
". $row [' Subject ']." |