Browse Source

Sorted experience tiles by start_date and id

Victor Hernandez 4 years ago
parent
commit
7799fe3382
1 changed files with 11 additions and 3 deletions
  1. 11
    3
      home.php

+ 11
- 3
home.php View File

@@ -157,7 +157,7 @@
157 157
 				<h3 class="col-sm-12" style="color: white;">
158 158
 					<?php echo $rowP['name']; ?>
159 159
 					<button type="button" class="btn btn-link btn-lg" data-toggle="popover" title="Project Description" data-content="<?php echo $rowP['description']; ?>" data-placement="right">
160
-						<span style="color: #eee;" class="glyphicon glyphicon-align-left" aria-hidden="true"></span>
160
+						<span style="color: #eee;" class="glyphicon glyphicon-question-sign" aria-hidden="true"></span><!--glyphicon-align-left-->
161 161
 					</button>
162 162
 				</h3>
163 163
 <!-- 				</div> -->
@@ -170,8 +170,13 @@
170 170
 
171 171
 		$queryExperiencesInProject = "SELECT E.id AS eid, E.title AS ename, E.start_date, E.end_date
172 172
 										FROM experience AS E
173
-										WHERE E.id IN (SELECT id_experience FROM project_experience WHERE id_project = '" . $rowP['id'] . "')
174
-										ORDER BY E.start_date DESC";
173
+										JOIN project_experience AS PE
174
+										WHERE E.id = PE.id_experience
175
+										AND PE.id_project = '" . $rowP['id'] . "' ORDER BY E.start_date DESC, E.id";
176
+										
177
+										
178
+										
179
+			//WHERE E.id IN (SELECT id_experience FROM project_experience WHERE id_project = '" . $rowP['id'] . "')
175 180
 		$resultExperiencesInProject = mysqli_query($connection, $queryExperiencesInProject);
176 181
 		while($row = mysqli_fetch_array($resultExperiencesInProject)):
177 182
 
@@ -329,6 +334,9 @@
329 334
 									<select class="form-control text-center" style="text-align-last: center;" id='e_type' name='type' required>
330 335
 										<option selected value="Course-Based Research Experience">Course-Based Research Experience</option>
331 336
 										<option value="Undergraduate Research Experience">Undergraduate Research Experience</option>
337
+										<?php if($_SESSION['dbUserData']['admin'] === '1'): ?>
338
+											<option value="Test">Test</option>
339
+										<?php endif; ?>
332 340
 									</select>
333 341
 								</div>
334 342
 							</div>