NxTIC/test/import.php

31 lines
602 B
PHP
Raw Normal View History

2016-12-13 18:38:52 +00:00
<?php define('__ROOT__', dirname(__DIR__));
require_once __ROOT__.'/autoloader.php';
debug();
use \database\core\DatabaseDriver;
use \database\core\Rows;
use \database\core\Table;
function getSubjects(){
// let's suppose idEtude
$etude = Table::get('sujets', 'lab-surveys')
->where('idEtude', 3);
/* (1) Fetch subjects of this etude */
$sujets = Table::get('sujets', 'lab-surveys')
->join('idEtude', $etude)
->select('idSujet', null, false, 'id')
->select('pseudo');
return sujets->fetchAll();
}
function getQuestions(){}
function getAnswers($id_subject){}