[ Index ] |
|
Code source de SPIP Agora 1.4 |
1 <?php 2 /***************************************************** 3 * This file is part of Agora, web based content management system. 4 * 5 * Agora is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; version 2 of the License. 8 * 9 * Agora is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details (file "COPYING"). 13 * 14 * Copyright © Arnaud Martin, Antoine Pitrou et Philippe Rivière. 15 * List of authors detailed in "copyright_fr.html" file. 16 * E-mail : agora@sig.premier-ministre.gouv.fr 17 * Web site : http://www.agora.gouv.fr 18 *****************************************************/ 19 // MySQL implementation for messageListData 20 // 21 22 if (defined("_BD_MESSAGELISTDATAMYSQL")) 23 return; 24 25 define("_BD_MESSAGELISTDATAMYSQL", "1"); 26 27 require_once dirname(__FILE__). "/../messagelistdata.php"; 28 require_once dirname(__FILE__). "/../inc_listdata_querytypes_constants.php"; 29 30 /** 31 * BD_message_mysql is an implementation for MySQL of BD_message business class. 32 * @package BD_mysql 33 * @author Erwan Le Bescond <elebescond@clever-age.com> 34 * @access public 35 */ 36 class BD_messageListData_mysql extends BD_messageListData { 37 function BD_messageListData_mysql () { 38 $par = get_parent_class($this); 39 $this->$par(); 40 } 41 42 // {{{ _adaptQueriesToDriver() 43 44 /** 45 * This method must be redefines in derived class if the driver requires 46 * the use of database specific querying (non SQL 92 compliant queries) 47 * this method is "protected" 48 * @access private 49 */ 50 function _adaptQueriesToDriver () { 51 /* 52 $this->_queries[MESSAGES_BY_RV_AND_DATE] = "SELECT * FROM ".$GLOBALS['table_prefix']."_messages messages, ".$GLOBALS['table_prefix']."_auteurs_messages lien ". 53 "WHERE lien.id_auteur=? AND rv=? AND date_heure > DATE_SUB(NOW(), INTERVAL 1 DAY) ". 54 "AND statut=? AND lien.id_message=messages.id_message"; 55 $this->_queriesCount[MESSAGES_BY_RV_AND_DATE] = "SELECT COUNT(*) FROM ".$GLOBALS['table_prefix']."_messages messages, ".$GLOBALS['table_prefix']."_auteurs_messages lien ". 56 "WHERE lien.id_auteur=? AND rv=? AND date_heure > DATE_SUB(NOW(), INTERVAL 1 DAY) ". 57 "AND statut=? AND lien.id_message=messages.id_message"; 58 59 60 $this->_queries[MESSAGES_BY_AUTEUR_STATUT_TYPE_DATE_RV] = "SELECT * FROM ".$GLOBALS['table_prefix']."_messages messages WHERE id_auteur=? AND statut=? AND type=? AND (date_heure > DATE_SUB(NOW(), INTERVAL 1 DAY) OR rv <> ?)"; 61 $this->_queriesCount[MESSAGES_BY_AUTEUR_STATUT_TYPE_DATE_RV] = "SELECT COUNT(*) FROM ".$GLOBALS['table_prefix']."_messages messages WHERE id_auteur=? AND statut=? AND type=? AND (date_heure > DATE_SUB(NOW(), INTERVAL 1 DAY) OR rv <> ?)"; 62 */ 63 } 64 65 // }}} 66 67 } 68 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 14:40:03 2007 | par Balluche grâce à PHPXref 0.7 |