Mercurial > hg > extraction-interface
comparison interface/check_sections.php @ 4:883ad980a43b
add dynasty column to table books
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Tue, 27 Jan 2015 16:40:30 +0100 |
parents | ef6d0c6a13d7 |
children | 0e9a7c69f22c |
comparison
equal
deleted
inserted
replaced
3:f196939ccc03 | 4:883ad980a43b |
---|---|
69 | 69 |
70 // sorting by the $sort_by parameter | 70 // sorting by the $sort_by parameter |
71 function checkSections_sort_by($sort_by){ | 71 function checkSections_sort_by($sort_by){ |
72 switch ($sort_by) { | 72 switch ($sort_by) { |
73 case 'time': | 73 case 'time': |
74 $query="(SELECT name AS book_name,level1,level2,period,start_year,id from books ORDER BY start_year)"; | 74 $query="(SELECT name AS book_name,level1,level2,period,dynasty,start_year,id from books ORDER BY start_year)"; |
75 $result = mysql_query($query); | 75 $result = mysql_query($query); |
76 echo mysql_num_rows($result)." result(s)<br><br>"; | 76 echo mysql_num_rows($result)." result(s)<br><br>"; |
77 echo "<table>"; | 77 echo "<table>"; |
78 echo "<tr>"; | 78 echo "<tr>"; |
79 echo "<td class='bookName'>book name<td class='level1'>level1<td class='level2'>level2<td class='period'>period<td class='start_year'>start_year"; | 79 echo "<td class='bookName'>book name<td class='level1'>level1<td class='level2'>level2<td class='period'>period<td class='dynasty'>dynasty<td class='start_year'>start_year"; |
80 while ($row = mysql_fetch_assoc($result)) { | 80 while ($row = mysql_fetch_assoc($result)) { |
81 $str="<tr>"; | 81 $str="<tr>"; |
82 $str.="<td>".$row['book_name']; | 82 $str.="<td>".$row['book_name']; |
83 $str.="<td>".$row['level1']; | 83 $str.="<td>".$row['level1']; |
84 $str.="<td>".$row['level2']; | 84 $str.="<td>".$row['level2']; |
85 $str.="<td>".$row['period']; | 85 $str.="<td>".$row['period']; |
86 $str.="<td>".$row['dynasty']; | |
86 $str.="<td>".$row['start_year']; | 87 $str.="<td>".$row['start_year']; |
87 $str.="<td><a href='check_sections_details.php?book_id=".$row['id']."&count=100"."' target='_blank'>"."click here"."</a>"; | 88 $str.="<td><a href='check_sections_details.php?book_id=".$row['id']."&count=100"."' target='_blank'>"."click here"."</a>"; |
88 echo $str; | 89 echo $str; |
89 } | 90 } |
90 echo "</table>"; | 91 echo "</table>"; |
104 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | 105 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
105 <html> | 106 <html> |
106 <head> | 107 <head> |
107 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | 108 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
108 <link href="css/search.css" type="text/css" rel="stylesheet"/> | 109 <link href="css/search.css" type="text/css" rel="stylesheet"/> |
109 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> | 110 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> |
110 <!--<script src="js/check_sections.js" charset="utf-8"></script>!--> | 111 <!--<script src="js/check_sections.js" charset="utf-8"></script>!--> |
111 </head> | 112 </head> |
112 <body> | 113 <body> |
113 <form action='check_sections.php' method='GET'> | 114 <form action='check_sections.php' method='GET'> |
114 find sections overlapping more than <input type="text" name="count"> other sections | 115 find sections overlapping more than <input type="text" name="count"> other sections |