Skip to content

Commit

Permalink
Change table name to pb_entreprises (#12)
Browse files Browse the repository at this point in the history
pb for page bleue
  • Loading branch information
Axtazer authored Oct 1, 2024
2 parents 91e5e76 + f214e0b commit 476507a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
// Fonction de recherche d'entreprises
function searchEnterprises($search) {
global $db;
$query = "SELECT * FROM ENTREPRISE WHERE nom LIKE :search OR description LIKE :search LIMIT 10";
$query = "SELECT * FROM pb_entreprises WHERE nom LIKE :search OR description LIKE :search LIMIT 5";
$stmt = $db->prepare($query);
$stmt->execute(['search' => "%$search%"]);
return $stmt->fetchAll(PDO::FETCH_ASSOC);
Expand All @@ -60,7 +60,7 @@ function searchEnterprises($search) {
}

// Récupération des entreprises aléatoires pour la page d'accueil
$query = "SELECT * FROM ENTREPRISE ORDER BY RAND() LIMIT 12";
$query = "SELECT * FROM pb_entreprises ORDER BY RAND() LIMIT 12";
$stmt = $db->query($query);
$enterprises = $stmt->fetchAll(PDO::FETCH_ASSOC);

Expand Down

0 comments on commit 476507a

Please sign in to comment.