Corrections mineures + upload et modification BDD

This commit is contained in:
xdrm-brackets 2016-04-19 16:00:17 +02:00
parent 8e58358314
commit a987c177a7
9 changed files with 156 additions and 115 deletions

View File

@ -3,7 +3,7 @@
-- http://www.phpmyadmin.net -- http://www.phpmyadmin.net
-- --
-- Host: localhost -- Host: localhost
-- Generation Time: Apr 13, 2016 at 02:54 PM -- Generation Time: Apr 19, 2016 at 03:36 PM
-- Server version: 5.6.28-0ubuntu0.15.10.1 -- Server version: 5.6.28-0ubuntu0.15.10.1
-- PHP Version: 5.6.11-1ubuntu3.1 -- PHP Version: 5.6.11-1ubuntu3.1
@ -32,7 +32,7 @@ CREATE TABLE IF NOT EXISTS `api_token` (
`name` varchar(50) NOT NULL, `name` varchar(50) NOT NULL,
`expires` date NOT NULL, `expires` date NOT NULL,
`permission` text NOT NULL `permission` text NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=latin1; ) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=latin1;
-- --
-- Dumping data for table `api_token` -- Dumping data for table `api_token`
@ -40,26 +40,52 @@ CREATE TABLE IF NOT EXISTS `api_token` (
INSERT INTO `api_token` (`id_token`, `token`, `name`, `expires`, `permission`) VALUES INSERT INTO `api_token` (`id_token`, `token`, `name`, `expires`, `permission`) VALUES
(38, '48e701d4e72e4e35bc37c9a800b49d5400734d7b', 'test', '2016-04-11', 'admin,token'), (38, '48e701d4e72e4e35bc37c9a800b49d5400734d7b', 'test', '2016-04-11', 'admin,token'),
(39, '935fe104d0e64d36e466c7a0a1c9773e3d7521c5', 'user#1', '2016-04-22', 'admin,token'), (51, '52945efbed43b50c12413f2f0e9519bfd9e98ce8', 'API', '2016-04-24', 'token,admin');
(48, 'bba06e9b01f5ac00798d6cf241d8bf105da0f25a', 'user#2', '2016-05-02', 'admin,token'),
(49, '5ac2c74474ea4b1279b4dacb538da8a0bd1e2adb', 'acces romain', '2016-07-22', '');
-- -------------------------------------------------------- -- --------------------------------------------------------
-- --
-- Table structure for table `Categories` -- Table structure for table `call_directory`
-- --
CREATE TABLE IF NOT EXISTS `Categories` ( CREATE TABLE IF NOT EXISTS `call_directory` (
`id_call_directory` int(11) NOT NULL,
`id_owner` int(11) NOT NULL,
`number` varchar(10) NOT NULL,
`name` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `call_logs`
--
CREATE TABLE IF NOT EXISTS `call_logs` (
`id_call_log` int(11) NOT NULL,
`source` varchar(10) NOT NULL,
`target` varchar(10) NOT NULL,
`type` varchar(5) NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`duration` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `categories`
--
CREATE TABLE IF NOT EXISTS `categories` (
`idCategorie` int(11) NOT NULL, `idCategorie` int(11) NOT NULL,
`intitule` varchar(40) NOT NULL `intitule` varchar(40) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
-- --
-- Dumping data for table `Categories` -- Dumping data for table `categories`
-- --
INSERT INTO `Categories` (`idCategorie`, `intitule`) VALUES INSERT INTO `categories` (`idCategorie`, `intitule`) VALUES
(1, '_CALL'), (1, '_CALL'),
(2, '_SMS'), (2, '_SMS'),
(3, '_FACEBOOK'), (3, '_FACEBOOK'),
@ -68,10 +94,10 @@ INSERT INTO `Categories` (`idCategorie`, `intitule`) VALUES
-- -------------------------------------------------------- -- --------------------------------------------------------
-- --
-- Table structure for table `Etudes` -- Table structure for table `etudes`
-- --
CREATE TABLE IF NOT EXISTS `Etudes` ( CREATE TABLE IF NOT EXISTS `etudes` (
`idEtude` int(11) NOT NULL, `idEtude` int(11) NOT NULL,
`intitule` int(11) DEFAULT NULL `intitule` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1; ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
@ -79,10 +105,10 @@ CREATE TABLE IF NOT EXISTS `Etudes` (
-- -------------------------------------------------------- -- --------------------------------------------------------
-- --
-- Table structure for table `Etude_Personnes` -- Table structure for table `etude_personnes`
-- --
CREATE TABLE IF NOT EXISTS `Etude_Personnes` ( CREATE TABLE IF NOT EXISTS `etude_personnes` (
`idEtude` int(11) NOT NULL DEFAULT '0', `idEtude` int(11) NOT NULL DEFAULT '0',
`idPersonne` int(11) NOT NULL DEFAULT '0' `idPersonne` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1; ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
@ -90,32 +116,10 @@ CREATE TABLE IF NOT EXISTS `Etude_Personnes` (
-- -------------------------------------------------------- -- --------------------------------------------------------
-- --
-- Table structure for table `Personnes` -- Table structure for table `questions`
-- --
CREATE TABLE IF NOT EXISTS `Personnes` ( CREATE TABLE IF NOT EXISTS `questions` (
`idPersonne` int(11) NOT NULL,
`pseudo` varchar(255) DEFAULT NULL,
`nom` varchar(255) DEFAULT NULL,
`prenom` varchar(255) DEFAULT NULL,
`id_facebook` int(11) DEFAULT NULL,
`telephone` varchar(10) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `Personnes`
--
INSERT INTO `Personnes` (`idPersonne`, `pseudo`, `nom`, `prenom`, `id_facebook`, `telephone`) VALUES
(1, 'Jeannot', '', 'Jean', NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `Questions`
--
CREATE TABLE IF NOT EXISTS `Questions` (
`idQuestion` int(11) NOT NULL, `idQuestion` int(11) NOT NULL,
`intitule` text NOT NULL, `intitule` text NOT NULL,
`qualification` varchar(255) NOT NULL, `qualification` varchar(255) NOT NULL,
@ -126,10 +130,10 @@ CREATE TABLE IF NOT EXISTS `Questions` (
-- -------------------------------------------------------- -- --------------------------------------------------------
-- --
-- Table structure for table `Relations` -- Table structure for table `relations`
-- --
CREATE TABLE IF NOT EXISTS `Relations` ( CREATE TABLE IF NOT EXISTS `relations` (
`idPersonneA` int(11) NOT NULL, `idPersonneA` int(11) NOT NULL,
`idPersonneB` int(11) NOT NULL, `idPersonneB` int(11) NOT NULL,
`idCategorie` int(11) DEFAULT NULL `idCategorie` int(11) DEFAULT NULL
@ -138,10 +142,10 @@ CREATE TABLE IF NOT EXISTS `Relations` (
-- -------------------------------------------------------- -- --------------------------------------------------------
-- --
-- Table structure for table `ReponsesAttendues` -- Table structure for table `reponsesAttendues`
-- --
CREATE TABLE IF NOT EXISTS `ReponsesAttendues` ( CREATE TABLE IF NOT EXISTS `reponsesAttendues` (
`idReponseAttendue` int(11) NOT NULL, `idReponseAttendue` int(11) NOT NULL,
`intitule` varchar(255) NOT NULL, `intitule` varchar(255) NOT NULL,
`idQuestion` int(11) NOT NULL `idQuestion` int(11) NOT NULL
@ -150,10 +154,10 @@ CREATE TABLE IF NOT EXISTS `ReponsesAttendues` (
-- -------------------------------------------------------- -- --------------------------------------------------------
-- --
-- Table structure for table `ReponsesUtilisateurs` -- Table structure for table `reponsesUtilisateurs`
-- --
CREATE TABLE IF NOT EXISTS `ReponsesUtilisateurs` ( CREATE TABLE IF NOT EXISTS `reponsesUtilisateurs` (
`idReponseUtilisateur` int(11) NOT NULL, `idReponseUtilisateur` int(11) NOT NULL,
`intitule` varchar(255) NOT NULL, `intitule` varchar(255) NOT NULL,
`idQuestion` int(11) NOT NULL, `idQuestion` int(11) NOT NULL,
@ -162,6 +166,28 @@ CREATE TABLE IF NOT EXISTS `ReponsesUtilisateurs` (
-- -------------------------------------------------------- -- --------------------------------------------------------
--
-- Table structure for table `sujets`
--
CREATE TABLE IF NOT EXISTS `sujets` (
`idSujet` int(11) NOT NULL,
`pseudo` varchar(255) DEFAULT NULL,
`nom` varchar(255) DEFAULT NULL,
`prenom` varchar(255) DEFAULT NULL,
`id_facebook` int(11) DEFAULT NULL,
`telephone` varchar(10) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `sujets`
--
INSERT INTO `sujets` (`idSujet`, `pseudo`, `nom`, `prenom`, `id_facebook`, `telephone`) VALUES
(1, 'Jeannot', '', 'Jean', NULL, NULL);
-- --------------------------------------------------------
-- --
-- Table structure for table `users` -- Table structure for table `users`
-- --
@ -170,18 +196,19 @@ CREATE TABLE IF NOT EXISTS `users` (
`id_user` int(11) NOT NULL, `id_user` int(11) NOT NULL,
`login` varchar(30) NOT NULL, `login` varchar(30) NOT NULL,
`password` varchar(40) NOT NULL, `password` varchar(40) NOT NULL,
`mail` varchar(255) NOT NULL, `mail` varchar(50) NOT NULL,
`reference` int(11) DEFAULT NULL, `reference` int(11) DEFAULT NULL,
`permission` text NOT NULL `permission` text NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1;
-- --
-- Dumping data for table `users` -- Dumping data for table `users`
-- --
INSERT INTO `users` (`id_user`, `login`, `password`, `mail`, `reference`, `permission`) VALUES INSERT INTO `users` (`id_user`, `login`, `password`, `mail`, `reference`, `permission`) VALUES
(1, 'xdrm', '5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8', 'xdrm@xdrm.io', NULL, 'admin,user'), (1, 'xdrm', 'fa80b2513864bbc9edd3ef52a9b6f29af3993768', 'xdrm@xdrm.io', NULL, 'admin'),
(3, 'test', 'a94a8fe5ccb19ba61c4c0873d391e987982fbbd3', 'test', NULL, 'user'); (11, 'julien.figeac', 'b5f2c48f299dabcf32e044ea6f2243abce812c55', 'julien.figeac@gmail.com', NULL, 'admin'),
(12, 'Buser', 'fa80b2513864bbc9edd3ef52a9b6f29af3993768', 'B@gmail.com', NULL, 'subject');
-- --
-- Indexes for dumped tables -- Indexes for dumped tables
@ -194,71 +221,80 @@ ALTER TABLE `api_token`
ADD PRIMARY KEY (`id_token`); ADD PRIMARY KEY (`id_token`);
-- --
-- Indexes for table `Categories` -- Indexes for table `call_logs`
-- --
ALTER TABLE `Categories` ALTER TABLE `call_logs`
ADD PRIMARY KEY (`id_call_log`);
--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
ADD PRIMARY KEY (`idCategorie`), ADD PRIMARY KEY (`idCategorie`),
ADD UNIQUE KEY `uindex_Catégories_idCatégorie` (`idCategorie`); ADD UNIQUE KEY `uindex_Catégories_idCatégorie` (`idCategorie`);
-- --
-- Indexes for table `Etudes` -- Indexes for table `etudes`
-- --
ALTER TABLE `Etudes` ALTER TABLE `etudes`
ADD PRIMARY KEY (`idEtude`), ADD PRIMARY KEY (`idEtude`),
ADD UNIQUE KEY `uindex_Etudes_idEtude` (`idEtude`); ADD UNIQUE KEY `uindex_Etudes_idEtude` (`idEtude`);
-- --
-- Indexes for table `Etude_Personnes` -- Indexes for table `etude_personnes`
-- --
ALTER TABLE `Etude_Personnes` ALTER TABLE `etude_personnes`
ADD PRIMARY KEY (`idEtude`,`idPersonne`), ADD PRIMARY KEY (`idEtude`,`idPersonne`),
ADD KEY `index_EP_idPersonne` (`idPersonne`); ADD KEY `index_EP_idPersonne` (`idPersonne`);
-- --
-- Indexes for table `Personnes` -- Indexes for table `questions`
-- --
ALTER TABLE `Personnes` ALTER TABLE `questions`
ADD PRIMARY KEY (`idPersonne`),
ADD UNIQUE KEY `uindex_Personnes_idPersonne` (`idPersonne`);
--
-- Indexes for table `Questions`
--
ALTER TABLE `Questions`
ADD PRIMARY KEY (`idQuestion`), ADD PRIMARY KEY (`idQuestion`),
ADD UNIQUE KEY `uindex_Questions_idQuestion` (`idQuestion`), ADD UNIQUE KEY `uindex_Questions_idQuestion` (`idQuestion`),
ADD KEY `index_Question_idEtude` (`idEtude`); ADD KEY `index_Question_idEtude` (`idEtude`);
-- --
-- Indexes for table `Relations` -- Indexes for table `relations`
-- --
ALTER TABLE `Relations` ALTER TABLE `relations`
ADD PRIMARY KEY (`idPersonneA`,`idPersonneB`), ADD PRIMARY KEY (`idPersonneA`,`idPersonneB`),
ADD KEY `index_Relations_idCategorie` (`idCategorie`), ADD KEY `index_Relations_idCategorie` (`idCategorie`),
ADD KEY `index_Relations_idUtilsateurB` (`idPersonneB`); ADD KEY `index_Relations_idUtilsateurB` (`idPersonneB`);
-- --
-- Indexes for table `ReponsesAttendues` -- Indexes for table `reponsesAttendues`
-- --
ALTER TABLE `ReponsesAttendues` ALTER TABLE `reponsesAttendues`
ADD PRIMARY KEY (`idReponseAttendue`), ADD PRIMARY KEY (`idReponseAttendue`),
ADD UNIQUE KEY `uindex_ReponsesAttendues_idReponseAttendue` (`idReponseAttendue`), ADD UNIQUE KEY `uindex_ReponsesAttendues_idReponseAttendue` (`idReponseAttendue`),
ADD KEY `index_ReponsesAttendues_idQuestion` (`idQuestion`); ADD KEY `index_ReponsesAttendues_idQuestion` (`idQuestion`);
-- --
-- Indexes for table `ReponsesUtilisateurs` -- Indexes for table `reponsesUtilisateurs`
-- --
ALTER TABLE `ReponsesUtilisateurs` ALTER TABLE `reponsesUtilisateurs`
ADD PRIMARY KEY (`idReponseUtilisateur`), ADD PRIMARY KEY (`idReponseUtilisateur`),
ADD UNIQUE KEY `uindex_ReponsesUtilisateurs_idReponseUtilisateur` (`idReponseUtilisateur`), ADD UNIQUE KEY `uindex_ReponsesUtilisateurs_idReponseUtilisateur` (`idReponseUtilisateur`),
ADD KEY `index_ReponsesUtilisateurs` (`idQuestion`), ADD KEY `index_ReponsesUtilisateurs` (`idQuestion`),
ADD KEY `index_ReponsesUtilisateurs_idPersonne` (`idUtilisateur`); ADD KEY `index_ReponsesUtilisateurs_idPersonne` (`idUtilisateur`);
--
-- Indexes for table `sujets`
--
ALTER TABLE `sujets`
ADD PRIMARY KEY (`idSujet`),
ADD UNIQUE KEY `uindex_Personnes_idPersonne` (`idSujet`);
-- --
-- Indexes for table `users` -- Indexes for table `users`
-- --
ALTER TABLE `users` ALTER TABLE `users`
ADD PRIMARY KEY (`id_user`); ADD PRIMARY KEY (`id_user`),
ADD UNIQUE KEY `login` (`login`),
ADD UNIQUE KEY `mail` (`mail`),
ADD UNIQUE KEY `reference` (`reference`);
-- --
-- AUTO_INCREMENT for dumped tables -- AUTO_INCREMENT for dumped tables
@ -268,79 +304,84 @@ ALTER TABLE `users`
-- AUTO_INCREMENT for table `api_token` -- AUTO_INCREMENT for table `api_token`
-- --
ALTER TABLE `api_token` ALTER TABLE `api_token`
MODIFY `id_token` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=50; MODIFY `id_token` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=61;
-- --
-- AUTO_INCREMENT for table `Categories` -- AUTO_INCREMENT for table `call_logs`
-- --
ALTER TABLE `Categories` ALTER TABLE `call_logs`
MODIFY `id_call_log` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
MODIFY `idCategorie` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5; MODIFY `idCategorie` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
-- --
-- AUTO_INCREMENT for table `Etudes` -- AUTO_INCREMENT for table `etudes`
-- --
ALTER TABLE `Etudes` ALTER TABLE `etudes`
MODIFY `idEtude` int(11) NOT NULL AUTO_INCREMENT; MODIFY `idEtude` int(11) NOT NULL AUTO_INCREMENT;
-- --
-- AUTO_INCREMENT for table `Personnes` -- AUTO_INCREMENT for table `questions`
-- --
ALTER TABLE `Personnes` ALTER TABLE `questions`
MODIFY `idPersonne` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `Questions`
--
ALTER TABLE `Questions`
MODIFY `idQuestion` int(11) NOT NULL AUTO_INCREMENT; MODIFY `idQuestion` int(11) NOT NULL AUTO_INCREMENT;
-- --
-- AUTO_INCREMENT for table `ReponsesAttendues` -- AUTO_INCREMENT for table `reponsesAttendues`
-- --
ALTER TABLE `ReponsesAttendues` ALTER TABLE `reponsesAttendues`
MODIFY `idReponseAttendue` int(11) NOT NULL AUTO_INCREMENT; MODIFY `idReponseAttendue` int(11) NOT NULL AUTO_INCREMENT;
-- --
-- AUTO_INCREMENT for table `ReponsesUtilisateurs` -- AUTO_INCREMENT for table `reponsesUtilisateurs`
-- --
ALTER TABLE `ReponsesUtilisateurs` ALTER TABLE `reponsesUtilisateurs`
MODIFY `idReponseUtilisateur` int(11) NOT NULL AUTO_INCREMENT; MODIFY `idReponseUtilisateur` int(11) NOT NULL AUTO_INCREMENT;
-- --
-- AUTO_INCREMENT for table `sujets`
--
ALTER TABLE `sujets`
MODIFY `idSujet` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `users` -- AUTO_INCREMENT for table `users`
-- --
ALTER TABLE `users` ALTER TABLE `users`
MODIFY `id_user` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4; MODIFY `id_user` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=17;
-- --
-- Constraints for dumped tables -- Constraints for dumped tables
-- --
-- --
-- Constraints for table `Etude_Personnes` -- Constraints for table `etude_personnes`
-- --
ALTER TABLE `Etude_Personnes` ALTER TABLE `etude_personnes`
ADD CONSTRAINT `fk_EP_idEtude` FOREIGN KEY (`idEtude`) REFERENCES `Etudes` (`idEtude`), ADD CONSTRAINT `fk_EP_idEtude` FOREIGN KEY (`idEtude`) REFERENCES `etudes` (`idEtude`),
ADD CONSTRAINT `fk_EP_idPersonne` FOREIGN KEY (`idPersonne`) REFERENCES `Personnes` (`idPersonne`); ADD CONSTRAINT `fk_EP_idPersonne` FOREIGN KEY (`idPersonne`) REFERENCES `sujets` (`idSujet`);
-- --
-- Constraints for table `Questions` -- Constraints for table `questions`
-- --
ALTER TABLE `Questions` ALTER TABLE `questions`
ADD CONSTRAINT `uindex_Question_idEtude` FOREIGN KEY (`idEtude`) REFERENCES `Etudes` (`idEtude`); ADD CONSTRAINT `uindex_Question_idEtude` FOREIGN KEY (`idEtude`) REFERENCES `etudes` (`idEtude`);
-- --
-- Constraints for table `Relations` -- Constraints for table `relations`
-- --
ALTER TABLE `Relations` ALTER TABLE `relations`
ADD CONSTRAINT `fk_Relations_idCategorie` FOREIGN KEY (`idCategorie`) REFERENCES `Categories` (`idCategorie`), ADD CONSTRAINT `fk_Relations_idCategorie` FOREIGN KEY (`idCategorie`) REFERENCES `categories` (`idCategorie`),
ADD CONSTRAINT `fk_Relations_idUtilsateurA` FOREIGN KEY (`idPersonneA`) REFERENCES `Personnes` (`idPersonne`), ADD CONSTRAINT `fk_Relations_idUtilsateurA` FOREIGN KEY (`idPersonneA`) REFERENCES `sujets` (`idSujet`),
ADD CONSTRAINT `fk_Relations_idUtilsateurB` FOREIGN KEY (`idPersonneB`) REFERENCES `Personnes` (`idPersonne`); ADD CONSTRAINT `fk_Relations_idUtilsateurB` FOREIGN KEY (`idPersonneB`) REFERENCES `sujets` (`idSujet`);
-- --
-- Constraints for table `ReponsesAttendues` -- Constraints for table `reponsesAttendues`
-- --
ALTER TABLE `ReponsesAttendues` ALTER TABLE `reponsesAttendues`
ADD CONSTRAINT `fk_ReponsesAttendues_idQuestion` FOREIGN KEY (`idQuestion`) REFERENCES `Questions` (`idQuestion`); ADD CONSTRAINT `fk_ReponsesAttendues_idQuestion` FOREIGN KEY (`idQuestion`) REFERENCES `questions` (`idQuestion`);
-- --
-- Constraints for table `ReponsesUtilisateurs` -- Constraints for table `reponsesUtilisateurs`
-- --
ALTER TABLE `ReponsesUtilisateurs` ALTER TABLE `reponsesUtilisateurs`
ADD CONSTRAINT `fk_ReponsesUtilisateurs` FOREIGN KEY (`idQuestion`) REFERENCES `Questions` (`idQuestion`), ADD CONSTRAINT `fk_ReponsesUtilisateurs` FOREIGN KEY (`idQuestion`) REFERENCES `questions` (`idQuestion`),
ADD CONSTRAINT `fk_ReponsesUtilisateurs_idPersonne` FOREIGN KEY (`idUtilisateur`) REFERENCES `Personnes` (`idPersonne`); ADD CONSTRAINT `fk_ReponsesUtilisateurs_idPersonne` FOREIGN KEY (`idUtilisateur`) REFERENCES `sujets` (`idSujet`);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;

View File

@ -55,7 +55,7 @@ APIClass.prototype = {
if( ptrAPI.xhr[i].readyState == 4 ){ // si la requête est terminée if( ptrAPI.xhr[i].readyState == 4 ){ // si la requête est terminée
/* DEBUG : affiche la réponse BRUTE de http://host/api/ */ /* DEBUG : affiche la réponse BRUTE de http://host/api/ */
console.log('http://host/api/ => '+ptrAPI.xhr[i].responseText); // console.log('http://host/api/ => '+ptrAPI.xhr[i].responseText);
// console.log( JSON.parse(ptrAPI.xhr[i].responseText) ); // console.log( JSON.parse(ptrAPI.xhr[i].responseText) );
/* si success de requête */ /* si success de requête */

View File

@ -60,11 +60,11 @@
=========================================================*/ =========================================================*/
$getRequestString = 'SELECT * FROM '.static::table_name(); $getRequestString = 'SELECT * FROM '.static::table_name();
// Si c'est 'getById', on ajoute une condition // Si c'est 'getById', on ajoute une condition (clé primaire)
if( $getById ){ if( $getById ){
$getRequestString .= ' WHERE '.$table_columns['_PRIMARY_'][0].' = :value'; $getRequestString .= ' WHERE '.$table_columns['_PRIMARY_'][0].' = :value';
// TODO: Les autres clés primaires si elle est composée avec les autres arguments // TODO: Gestion d'une clé primaire composée (plusieurs arguments)
// Si c'est 'getSomething', on ajoute une condition // Si c'est 'getSomething', on ajoute une condition
}else if( $getSomething ) }else if( $getSomething )

View File

@ -612,7 +612,7 @@
<span class="warning"><strong>Dead Code</strong></span> <span class="warning"><strong>Dead Code</strong></span>
</p> </p>
<p> <p>
<small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 2.1.7</a> using <a href="http://php.net/" target="_top">PHP 5.6.11-1ubuntu3.1</a> and <a href="http://phpunit.de/">PHPUnit 4.7.6</a> at Tue Apr 19 12:25:45 UTC 2016.</small> <small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 2.1.7</a> using <a href="http://php.net/" target="_top">PHP 5.6.11-1ubuntu3.1</a> and <a href="http://phpunit.de/">PHPUnit 4.7.6</a> at Tue Apr 19 13:34:42 UTC 2016.</small>
</p> </p>
<a title="Back to the top" id="toplink" href="#"><span class="glyphicon glyphicon-arrow-up"></span></a> <a title="Back to the top" id="toplink" href="#"><span class="glyphicon glyphicon-arrow-up"></span></a>
</footer> </footer>

View File

@ -247,7 +247,7 @@
<span class="warning"><strong>Dead Code</strong></span> <span class="warning"><strong>Dead Code</strong></span>
</p> </p>
<p> <p>
<small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 2.1.7</a> using <a href="http://php.net/" target="_top">PHP 5.6.11-1ubuntu3.1</a> and <a href="http://phpunit.de/">PHPUnit 4.7.6</a> at Tue Apr 19 12:25:45 UTC 2016.</small> <small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 2.1.7</a> using <a href="http://php.net/" target="_top">PHP 5.6.11-1ubuntu3.1</a> and <a href="http://phpunit.de/">PHPUnit 4.7.6</a> at Tue Apr 19 13:34:42 UTC 2016.</small>
</p> </p>
<a title="Back to the top" id="toplink" href="#"><span class="glyphicon glyphicon-arrow-up"></span></a> <a title="Back to the top" id="toplink" href="#"><span class="glyphicon glyphicon-arrow-up"></span></a>
</footer> </footer>

View File

@ -517,7 +517,7 @@
<span class="warning"><strong>Dead Code</strong></span> <span class="warning"><strong>Dead Code</strong></span>
</p> </p>
<p> <p>
<small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 2.1.7</a> using <a href="http://php.net/" target="_top">PHP 5.6.11-1ubuntu3.1</a> and <a href="http://phpunit.de/">PHPUnit 4.7.6</a> at Tue Apr 19 12:25:45 UTC 2016.</small> <small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 2.1.7</a> using <a href="http://php.net/" target="_top">PHP 5.6.11-1ubuntu3.1</a> and <a href="http://phpunit.de/">PHPUnit 4.7.6</a> at Tue Apr 19 13:34:42 UTC 2016.</small>
</p> </p>
<a title="Back to the top" id="toplink" href="#"><span class="glyphicon glyphicon-arrow-up"></span></a> <a title="Back to the top" id="toplink" href="#"><span class="glyphicon glyphicon-arrow-up"></span></a>
</footer> </footer>

View File

@ -214,7 +214,7 @@
<span class="warning"><strong>Dead Code</strong></span> <span class="warning"><strong>Dead Code</strong></span>
</p> </p>
<p> <p>
<small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 2.1.7</a> using <a href="http://php.net/" target="_top">PHP 5.6.11-1ubuntu3.1</a> and <a href="http://phpunit.de/">PHPUnit 4.7.6</a> at Tue Apr 19 12:25:45 UTC 2016.</small> <small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 2.1.7</a> using <a href="http://php.net/" target="_top">PHP 5.6.11-1ubuntu3.1</a> and <a href="http://phpunit.de/">PHPUnit 4.7.6</a> at Tue Apr 19 13:34:42 UTC 2016.</small>
</p> </p>
<a title="Back to the top" id="toplink" href="#"><span class="glyphicon glyphicon-arrow-up"></span></a> <a title="Back to the top" id="toplink" href="#"><span class="glyphicon glyphicon-arrow-up"></span></a>
</footer> </footer>

View File

@ -350,7 +350,7 @@
<span class="success"><strong>High</strong>: 90% to 100%</span> <span class="success"><strong>High</strong>: 90% to 100%</span>
</p> </p>
<p> <p>
<small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 2.1.7</a> using <a href="http://php.net/" target="_top">PHP 5.6.11-1ubuntu3.1</a> and <a href="http://phpunit.de/">PHPUnit 4.7.6</a> at Tue Apr 19 12:25:45 UTC 2016.</small> <small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 2.1.7</a> using <a href="http://php.net/" target="_top">PHP 5.6.11-1ubuntu3.1</a> and <a href="http://phpunit.de/">PHPUnit 4.7.6</a> at Tue Apr 19 13:34:42 UTC 2016.</small>
</p> </p>
</footer> </footer>
</div> </div>

View File

@ -315,7 +315,7 @@
<span class="warning"><strong>Dead Code</strong></span> <span class="warning"><strong>Dead Code</strong></span>
</p> </p>
<p> <p>
<small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 2.1.7</a> using <a href="http://php.net/" target="_top">PHP 5.6.11-1ubuntu3.1</a> and <a href="http://phpunit.de/">PHPUnit 4.7.6</a> at Tue Apr 19 12:25:45 UTC 2016.</small> <small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 2.1.7</a> using <a href="http://php.net/" target="_top">PHP 5.6.11-1ubuntu3.1</a> and <a href="http://phpunit.de/">PHPUnit 4.7.6</a> at Tue Apr 19 13:34:42 UTC 2016.</small>
</p> </p>
<a title="Back to the top" id="toplink" href="#"><span class="glyphicon glyphicon-arrow-up"></span></a> <a title="Back to the top" id="toplink" href="#"><span class="glyphicon glyphicon-arrow-up"></span></a>
</footer> </footer>