My Second Table in Form is not Appearing

[expired user #9339]'s profile image [expired user #9339] posted 8 years ago in General Permalink
I created a php form in Heidi that is to contain two tables. The second table is not appearing. I know the sql statement for closed contains records. Am I missing some kind of code to display table (closed tickets) 32? The title for Closed appears. This is the chunk of code:

<body>
<div id="ticketHeader">
<h1><span class="appTitle"><b>Pro</b>TRACK</span> Developer Request Viewer</h1>
<div class="completed">
<?
$qryClosed = mysqli_query($dB, "SELECT count(*) FROM adm_dev_tickets WHERE completed_date <> 'None'");
$rowClosed = mysqli_fetch_row($qryClosed);

$days = getWorkingDays('2014-08-27', date('Y-m-d'));
$avg = round($rowClosed[0]/$days, 2);

?>
<p>Remedied Tickets: <? echo $rowClosed[0];?></p>
<p>Avg of <? echo $avg;?> per workday</p>
</div>
</div>
<div id="reloadSection">
<div id="tablecontainer">
<h2 class="closeSection">Open Tickets</h2>
<table id="opentickets">
<tbody>
<tr class="section">
<td>Req Date</td>
<td>Requestor</td>
<td>Tracker</td>
<td>Level</td>
<td>Description</td>
<td>Deadline</td>
<td>Status</td>

</tr>
<?
$openQ = mysqli_query($dB, "SELECT * FROM adm_dev_tickets WHERE completed_date IN ('None','') ORDER BY req_level DESC, deadline DESC");
if (!mysqli_num_rows($openQ) > 0){
echo "<tr><td colspan='6'>None found.</td></tr>";
} else {
while ($openR = mysqli_fetch_assoc($openQ)){
?>
<tr>
<td><? echo duaneFix($openR['req_date']);?></td>
<td><? echo $openR['req_name'];?></td>
<td><? echo $openR['req_table'];?></td>
<td><? echo $levelArr[$openR['req_level']];?></td>
<td><div class="textHolder"><? echo nl2br($openR['desc']);?></div></td>
<td><? echo duaneFix($openR['deadline']);?></td>
<td>
<select id="stat" data-field-idx="<? echo $openR['idx'];?>">
<? foreach ($opts as $value){ ?>
<option <? echo ($value == $openR['stat']) ? "selected" : "";?>><? echo $value;?></option>
<? } ?>
</select>

</tr>
<? } } ?>
</tbody>
</table>
<h2 class="closeSection">Closed Tickets</h2>
<table id="closedtickets">
<thead>
<tr class="section">
<th>Req Date</th>
<th>Requestor</th>
<th>Level</th>
<th>Description</th>
<th>Deadline</th>
<th>Status</th>
<th>Closed Date</th>
</tr>
</thead>
<tbody>
<?
$closeQ = mysqli_query($dB, "SELECT count(*) FROM adm_dev_tickets WHERE completed_date <> 'None'");
if (!mysqli_num_rows($closeQ) > 0){
echo "<tr><td colspan='6'>None found.</td></tr>";
} else {
while ($closeR = mysqli_fetch_assoc($closeQ)){
?>
<tr>
<td><? echo duaneFix($closeR['req_date']);?></td>
<td><? echo $closeR['req_name'];?></td>
<td><? echo $levelArr[$closeR['req_level']];?></td>
<td><div class="textHolder"><? echo nl2br($closeR['desc']);?></div></td>
<td><? echo duaneFix($closeR['deadline']);?></td>
<td><? echo $closeR['stat'];?></td>
<td><? echo duaneFix($closeR['completed_date']);?></td>
</tr>
<? } } ?>
</tbody>
</table>
</div>
</div>
</body>
[expired user #9339]'s profile image [expired user #9339] posted 8 years ago Permalink
I changed my $closeQ select statement, that is not making a difference.

$closeQ = mysqli_query($dB, "SELECT * FROM adm_dev_tickets WHERE completed_date <> 'None'");
ansgar's profile image ansgar posted 8 years ago Permalink
Please note that this is a forum for HeidiSQL, not for debugging PHP code.

Anyways, does the second table show the "None found." row?

Please login to leave a reply, or register at first.