modif getQuoteOfTheDay

pull/21/head
brongniart 5 months ago
parent 54e03f94fc
commit da5ed786a8

@ -69,12 +69,14 @@ Class QuoteGateway extends Gateway{
public function getQuoteOfTheDay(string $language): array {
$query = "SELECT q.id_quote, q.content, c.caracter, i.imgPath, s.title, s.dateS, q.likes, q.langue
FROM Quote q
FROM DailyQuote dq
JOIN Quote q ON dq.citation_id = q.id_quote
JOIN Caracter c ON c.id_caracter = q.id_caracter
JOIN Source s ON s.id_source = q.id_source
JOIN Image i ON c.id_img = i.id_img
WHERE q.isValide = true AND q.isCitationDuJour = true AND q.langue = :language
ORDER BY id_quote DESC LIMIT 1;";
WHERE q.isValide = true AND q.langue = :language
ORDER BY q.id_quote DESC
LIMIT 1;";
try {
$this->co->executeQuery($query, [':language' => [$language, PDO::PARAM_STR]]);
$result = $this->co->getResults();
@ -86,6 +88,7 @@ Class QuoteGateway extends Gateway{
}
public function getSuggestions(int $numpage, string $language): array {
$query = "SELECT q.id_quote, q.content, c.caracter, i.imgPath, s.title, s.dateS, q.likes, q.langue
FROM Quote q

Loading…
Cancel
Save