57 lines
1.2 KiB
PHP
57 lines
1.2 KiB
PHP
<?php
|
|
|
|
define('__ROOT__', dirname(dirname(dirname(__FILE__))) );
|
|
|
|
require_once __ROOT__.'/autoloader.php';
|
|
|
|
|
|
|
|
|
|
use \database\core\Repo;
|
|
use \database\core\DatabaseDriver;
|
|
use \orm\core\Table;
|
|
use \orm\core\Rows;
|
|
|
|
debug();
|
|
|
|
|
|
/* [2] Requests on lab-surveys
|
|
=========================================================*/
|
|
$lisst = Table::get('laboratoires', 'lab-surveys')
|
|
// ->select('idLaboratoire')
|
|
->whereIntitule('LISST');
|
|
|
|
$etudes = Table::get('etudes', 'lab-surveys')
|
|
// ->select('idEtude')
|
|
->join('idLaboratoire', $lisst)
|
|
->orderby('idEtude')
|
|
->unique();
|
|
|
|
$fiches = Table::get('fiches', 'lab-surveys')
|
|
->select('idFiche')
|
|
->orderby('idFiche')
|
|
->join('idEtude', $etudes);
|
|
|
|
$questions = Table::get('questionsFiches', 'lab-surveys')
|
|
->select('idQuestionFiche')
|
|
->select('intitule', null, null, 'question')
|
|
->orderby('idQuestionFiche')
|
|
// ->unique()
|
|
->join('idFiche', $fiches);
|
|
|
|
$repAtt = Table::get('reponsesAttenduesFiches', 'lab-surveys')
|
|
->select('intitule', Rows::SEL_CONCAT, null, 'reponses')
|
|
->orderby('idReponseAttendueFiche')
|
|
->join('idQuestionFiche', $questions);
|
|
|
|
$sujets = Table::get('sujets', 'lab-surveys')
|
|
->select('idSujet')
|
|
->select('pseudo');
|
|
|
|
|
|
|
|
|
|
var_dump( $v=$repAtt->fetch() );
|
|
|
|
?>
|