Hi ,
Can someone please let me know where i am going wrong with this code.
I just cannot seee where i am going wrong or if anyone can suggest a better way of doing it.
My connections files is a seperate php file code below and is on a include function
[php]
[/php]
The code i am running is
[php]
<table class="table">
<tr>
<th>Job Number</th>
<th>Customer</th>
<th>Type Of Equipment</th>
<th>Model</th>
<th>Fault</th>
<th>Location</th>
<th>Date Reported</th>
<th>Time Reported</th>
<th>Reported By</th>
<th>Attended By</th>
<th>Action Taken</th>
</tr>
<?php foreach ($results as $row) {
echo "<tr><td>";
echo $row['Job Number'];
echo "</td><td>";
echo "<tr><td>";
echo $row['Customer'];
echo "</td><td>";
echo "<tr><td>";
echo $row['Type Of Equipment'];
echo "</td><td>";
echo "<tr><td>";
echo $row['Model'];
echo "</td><td>";
echo "<tr><td>";
echo $row['Fault'];
echo "</td><td>";
}
?>
</table>
[/php]
My Php error log informs me of the below:
[11-Apr-2018 15:36:04 UTC] PHP Fatal error: Uncaught Error: Undefined class constant ‘fetch_Assoc’ in C:\inetpub\wwwroot\SupportDesk\php\Assigned_Tickets.php:20
Stack trace:
#0 {main}
thrown in C:\inetpub\wwwroot\SupportDesk\php\Assigned_Tickets.php on line 20
Which is Line:[php] $results=$stmt->fetchAll(PDO::fetch_Assoc); [/php]
Thanks inadvance
James