From b637d625216e50602d0bde8a544c281ca00af5fa Mon Sep 17 00:00:00 2001 From: Debulois Date: Thu, 31 Mar 2022 14:56:45 +0200 Subject: Grosse maj encore avec ajout de fonctionnalités dans l'admin principalement et grosse remise en page / rennomage et preparation pour retravailler le CSS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Database/meth_dbsearch.php | 62 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 15 deletions(-) (limited to 'Database/meth_dbsearch.php') diff --git a/Database/meth_dbsearch.php b/Database/meth_dbsearch.php index 7557583..eed9915 100644 --- a/Database/meth_dbsearch.php +++ b/Database/meth_dbsearch.php @@ -1,18 +1,26 @@ tableUserAccount." WHERE userId = ?"; - $result = $this->exec_cmd($reqSearchUser, array($id))->fetch(PDO::FETCH_ASSOC); + $result = $this->exec_cmd($reqSearchUser, array($userId))->fetch(PDO::FETCH_ASSOC); return $result; } // Récupération des infos d'un utilisateur par son id - final public function get_user_info_by_id($id) { + final public function get_user_info_by_userid($userId) { $reqGetUserInfo = " SELECT userId, lastname, firstname, degree, @@ -35,12 +43,32 @@ class DbSearch extends DbMain { ".$this->tableUserInfo." WHERE userId = ?"; - $result = $this->exec_cmd($reqGetUserInfo, array($id))->fetchAll(PDO::FETCH_ASSOC); + $result = $this->exec_cmd($reqGetUserInfo, array($userId))->fetchAll(PDO::FETCH_ASSOC); + return $result; + } + + // **************************************************************************** + // RECUPERATION DES INFORMATIONS RELATIVES AUX PROS + // **************************************************************************** + final public function get_all_pro_by_jobid($jobId) { + $reqSearchConsultant = " + SELECT + ".$this->tableUserInfo.".userId, + lastname, firstname, capability + FROM + ".$this->tableUserInfo." + INNER JOIN + ".$this->tableUserJob." + ON + ".$this->tableUserInfo.".userId = ".$this->tableUserJob.".userId + WHERE + jobCategoryId = ?"; + $result = $this->exec_cmd($reqSearchConsultant, array($jobId))->fetchAll(PDO::FETCH_ASSOC); return $result; } // Récupération des infos d'un pro par son nom - final public function get_pro_info_by_lastname($research) { + final public function get_pro_info_by_lastname($lastname) { $reqSearchConsultant = " SELECT ".$this->tableUserInfo.".userId, @@ -55,12 +83,12 @@ class DbSearch extends DbMain { userStatus = '1' AND lastname LIKE CONCAT('%', ?, '%')"; - $result = $this->exec_cmd($reqSearchConsultant, array($research))->fetchAll(PDO::FETCH_ASSOC); + $result = $this->exec_cmd($reqSearchConsultant, array($lastname))->fetchAll(PDO::FETCH_ASSOC); return $result; } // Récupération des emploies associés à un pro - final public function get_pro_job_category($proId) { + final public function get_pro_job_by_proid($proId) { $reqGetAll = " SELECT ".$this->tableUserJob.".jobCategoryId, @@ -78,7 +106,7 @@ class DbSearch extends DbMain { } // Récupération des notes d'un consultant par son nom - final public function get_pro_note_by_id($proId) { + final public function get_pro_note_by_proid($proId) { $reqCountMission = " SELECT note @@ -94,8 +122,11 @@ class DbSearch extends DbMain { return $result; } + // **************************************************************************** + // RECUPERATION DES INFORMATIONS RELATIVES AUX EMPLOIS + // **************************************************************************** // Récupérer toutes les infos de la table jobCategory - final public function get_job_category_all() { + final public function get_job_all() { $reqGetAllJobs = " SELECT * @@ -106,7 +137,7 @@ class DbSearch extends DbMain { } // Récupérer toutes les infos de la table jobCategory - final public function get_job_category_by_id($jobId) { + final public function get_job_by_jobid($jobId) { $reqGetJobinfo = " SELECT * @@ -118,4 +149,5 @@ class DbSearch extends DbMain { return $result; } } + ?> \ No newline at end of file -- cgit v1.2.3