[ Index ]
 

Code source de SPIP Agora 1.4

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/Agora1-4/ecrire/include/bd/mysql/ -> forumlistdata_mysql.php (source)

   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 ForumListData
  20  //
  21  
  22  if (defined("_BD_FORUMLISTDATAMYSQL"))
  23      return;
  24  
  25  define("_BD_FORUMLISTDATAMYSQL", "1");
  26  
  27  require_once dirname(__FILE__). "/../forumlistdata.php";
  28  require_once dirname(__FILE__). "/../inc_listdata_querytypes_constants.php";
  29  /**
  30   * BD_forum_mysql is an implementation for MySQL of BD_forum business class.
  31   * @package    BD_mysql
  32   * @author     Erwan Le Bescond <elebescond@clever-age.com>
  33   * @access    public
  34   */
  35  class BD_forumListData_mysql extends BD_forumListData {
  36  
  37      // {{{ constructor
  38  
  39      /**
  40       * Constructor
  41       * @access public
  42       */
  43  	function BD_forumListData_mysql () {
  44          $par = get_parent_class($this);
  45          $this->$par();
  46      }
  47  
  48      // }}}
  49  
  50      // {{{ _adaptQueriesToDriver()
  51  
  52      /**
  53       * This method must be redefines in derived class if the driver requires
  54       * the use of database specific querying (non SQL 92 compliant queries)
  55       * this method is "protected"
  56       * @access private
  57       */
  58  	function _adaptQueriesToDriver () {
  59                                      /*
  60                                              $this->_queries[FORUM_BY_STATE_AND_ARTICLEID] = "SELECT * FROM ".$GLOBALS['table_prefix']."_forum WHERE statut=? AND id_article=? AND id_parent=0 ORDER BY date_heure DESC LIMIT ?,?";
  61                                              $this->_queriesCount[FORUM_BY_STATE_AND_ARTICLEID] = "SELECT COUNT(*) FROM ".$GLOBALS['table_prefix']."_forum WHERE statut=? AND id_article=? AND id_parent=0 ORDER BY date_heure DESC LIMIT ?,?";
  62                                      
  63                                              $this->_queries[FORUM_BY_STATE_AND_BREVEID] = "SELECT * FROM ".$GLOBALS['table_prefix']."_forum WHERE statut=? AND id_breve=? AND id_parent=0 ORDER BY date_heure DESC LIMIT 0,20";
  64                                              $this->_queriesCount[FORUM_BY_STATE_AND_BREVEID] = "SELECT COUNT(*) FROM ".$GLOBALS['table_prefix']."_forum WHERE statut=? AND id_breve=? AND id_parent=0 ORDER BY date_heure DESC LIMIT 0,20";
  65                                      
  66                                      
  67                                              $this->_queries[FORUM_BY_STATE] = "SELECT * FROM ".$GLOBALS['table_prefix']."_forum WHERE statut=? AND id_parent=0 ORDER BY date_heure DESC LIMIT ?,10";
  68                                              $this->_queriesCount[FORUM_BY_STATE] = "SELECT * FROM ".$GLOBALS['table_prefix']."_forum WHERE statut=? AND id_parent=0 ORDER BY date_heure DESC LIMIT ?,10";
  69                                      
  70                                      
  71                                              $this->_queries[FORUM_BY_STATE_AND_MESSAGEID] = "SELECT * FROM ".$GLOBALS['table_prefix']."_forum WHERE statut=? AND id_message=? AND id_parent=0 ORDER BY date_heure DESC LIMIT 0,20";
  72                                              $this->_queriesCount[FORUM_BY_STATE_AND_MESSAGEID] = "SELECT * FROM ".$GLOBALS['table_prefix']."_forum WHERE statut=? AND id_message=? AND id_parent=0 ORDER BY date_heure DESC LIMIT 0,20";
  73                                      
  74                                              $this->_queries[FORUM_BY_STATE_AND_SYNDICID] = "SELECT * FROM ".$GLOBALS['table_prefix']."_forum WHERE statut=? AND id_message=? AND id_syndic=0 ORDER BY date_heure DESC LIMIT 0,20";
  75                                              $this->_queriesCount[FORUM_BY_STATE_AND_SYNDICID] = "SELECT * FROM ".$GLOBALS['table_prefix']."_forum WHERE statut=? AND id_message=? AND id_syndic=0 ORDER BY date_heure DESC LIMIT 0,20";
  76                                      */
  77                                      }
  78  
  79                                  // }}}
  80                                  }
  81  ?>


Généré le : Sat Feb 24 14:40:03 2007 par Balluche grâce à PHPXref 0.7