Fix issue #4.

This commit is contained in:
nearwood 2015-02-08 16:10:01 -05:00
parent 3c4fbed4fe
commit 0228ed76bc
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ echo '<table>';
echo '<tr><th>ID</th><th>Cylinders</th><th>Liters</th><th>Compression</th><th>Turbo</th><th>Firmware/Version</th><th>Upload Date</th><th>Views</th></th>';
for ($c = 0; $c < $numResults; $c++)
{
echo '<tr><td><a href="index.php?msq=' . $results[$c]['id'] . '">' . $results[$c]['id'] . '</a></td><td>' . $results[$c]['numCylinders'] . '</td><td>' . $results[$c]['displacement'] . '</td><td>' . $results[$c]['compression'] . ':1</td><td>' . $results[$c]['induction'] . '</td><td>' . $results[$c]['firmware'] . '/' . $results[$c]['signature'] . '</td><td>' . $results[$c]['uploadDate'] . '</td><td></td></tr>';
echo '<tr><td><a href="index.php?msq=' . $results[$c]['mid'] . '">' . $results[$c]['mid'] . '</a></td><td>' . $results[$c]['numCylinders'] . '</td><td>' . $results[$c]['displacement'] . '</td><td>' . $results[$c]['compression'] . ':1</td><td>' . $results[$c]['induction'] . '</td><td>' . $results[$c]['firmware'] . '/' . $results[$c]['signature'] . '</td><td>' . $results[$c]['uploadDate'] . '</td><td></td></tr>';
}
echo '</table>';
?>

2
db.php
View File

@ -296,7 +296,7 @@ function getAll()
try
{
$st = $db->prepare("SELECT * FROM metadata INNER JOIN engines ON metadata.engine = engines.id");
$st = $db->prepare("SELECT m.id as mid, numCylinders, displacement, compression, induction, firmware, signature, uploadDate FROM metadata m INNER JOIN engines e ON m.engine = e.id");
if ($st->execute())
{
$result = $st->fetchAll(PDO::FETCH_ASSOC);