master
flejk 3 years ago
parent f56e0b657b
commit a8dde111d7

@ -1,6 +1,6 @@
<?php <?php
function listLatestBeers($pdo, $where){ /*function listLatestBeers($pdo, $where){
$conn = $pdo; $conn = $pdo;
try { try {
$sql = "SELECT * FROM beer ORDER BY time DESC LIMIT $where"; $sql = "SELECT * FROM beer ORDER BY time DESC LIMIT $where";
@ -26,7 +26,7 @@ function listLatestBreweries($pdo, $where){
echo "Error in Breweries: " . $e->getMessage(); echo "Error in Breweries: " . $e->getMessage();
} }
return $arrayOfBreweries; return $arrayOfBreweries;
} }*/
function listLatestUsers($pdo, $where){ function listLatestUsers($pdo, $where){
$conn = $pdo; $conn = $pdo;

@ -62,7 +62,6 @@ if($_GET["type"]=="article"){
if($_GET["type"]=="all"){ if($_GET["type"]=="all"){
$name=$_GET["keyword"]; $name=$_GET["keyword"];
$array=listArticleByName($pdo, $name); $array=listArticleByName($pdo, $name);
foreach($arrayOfBeers as $row):
foreach($array as $row) : foreach($array as $row) :
echo "<div class=\"box\">"; echo "<div class=\"box\">";
echo "<article>"; echo "<article>";

@ -1,8 +1,11 @@
<?php <?php
require_once("model/db.php"); require("model/db.php");
require_once("controller/listLatest.php"); echo "kappa";
require("controller/listLatest.php");
echo "kappa";
?> ?>
<aside> <aside>
<?php <?php
@ -22,11 +25,7 @@ $title = "Breweries";
$where = "5"; $where = "5";
$what = "brewery"; $what = "brewery";
<<<<<<< HEAD $array = listBreweriesNAN( $pdo );
$array = listBreweriesNAN($pdo);
=======
$array = listBeersByBreweryNAN($pdo);
>>>>>>> 93e36a779e5f963953576602543f9564d860498b
require("sidebar/sidebarLister.php"); require("sidebar/sidebarLister.php");

Loading…
Cancel
Save