| Line 15... |
Line 15... |
| 15 |
* @author Aurélien PERONNET <aurelien@tela-botanica.org>
|
15 |
* @author Aurélien PERONNET <aurelien@tela-botanica.org>
|
| 16 |
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
16 |
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
| 17 |
* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
|
17 |
* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
|
| 18 |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
|
18 |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
|
| 19 |
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
|
19 |
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
|
| 20 |
* @version $Id: Bdd.php 329 2011-02-11 13:34:58Z delphine $
|
20 |
* @version $Id: Bdd.php 333 2011-03-28 09:47:56Z delphine $
|
| 21 |
* @link /doc/framework/
|
21 |
* @link /doc/framework/
|
| 22 |
*/
|
22 |
*/
|
| 23 |
class Bdd {
|
23 |
class Bdd {
|
| 24 |
/** Constante stockant le squelette du message en cas d'erreur de requête sql. */
|
24 |
/** Constante stockant le squelette du message en cas d'erreur de requête sql. */
|
| 25 |
const ERREUR_REQUETE_TPL = 'Requête echec.\nFichier : %s.\nLigne : %s.\nMessage : %s.\nRequête : %s';
|
25 |
const ERREUR_REQUETE_TPL = 'Requête echec.\nFichier : %s.\nLigne : %s.\nMessage : %s.\nRequête : %s';
|
| Line 396... |
Line 396... |
| 396 |
switch ($this->abstraction) {
|
396 |
switch ($this->abstraction) {
|
| 397 |
case self::ABSTRACTION_PDO :
|
397 |
case self::ABSTRACTION_PDO :
|
| 398 |
$this->connexion = null;
|
398 |
$this->connexion = null;
|
| 399 |
break;
|
399 |
break;
|
| 400 |
case self::ABSTRACTION_MYSQL :
|
400 |
case self::ABSTRACTION_MYSQL :
|
| - |
|
401 |
if (isset($this->connexion)) {
|
| 401 |
return mysql_close($this->connexion);
|
402 |
return mysql_close($this->connexion);
|
| - |
|
403 |
}
|
| 402 |
break;
|
404 |
break;
|
| 403 |
case self::ABSTRACTION_MYSQLI :
|
405 |
case self::ABSTRACTION_MYSQLI :
|
| 404 |
$this->connexion->close();
|
406 |
$this->connexion->close();
|
| 405 |
break;
|
407 |
break;
|
| 406 |
case self::ABSTRACTION_SQLITE3 :
|
408 |
case self::ABSTRACTION_SQLITE3 :
|