You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ScienceQuest/project/src/model/gateways/ScientifiqueGateway.php

18 lines
447 B

<?php
namespace model;
class ScientifiqueGateway
{
private $con;
function __construct(Connection $con) {
$this->con = $con;
}
public function getRandom(): array|bool{
$this->con->executeQuery(
"SELECT id, nom, prenom, photo, dateNaissance, descriptif, ratiotrouvee, idthematique, iddifficulte, idsexe FROM Scientifique ORDER BY RANDOM() LIMIT 1;");
return $this->con->getOneResult();
}
}