[ 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/ -> articlelistdata_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 ArticleListData
  20  //
  21  
  22  if (defined("_BD_ARTICLELISTDATAMYSQL"))
  23      return;
  24  
  25  define("_BD_ARTICLELISTDATAMYSQL", "1");
  26  
  27  require_once dirname(__FILE__). "/../articlelistdata.php";
  28  require_once dirname(__FILE__). "/../inc_listdata_querytypes_constants.php";
  29  /**
  30   * BD_article_mysql is an implementation for MySQL of BD_article business class.
  31   * @package    BD_mysql
  32   * @author     Erwan Le Bescond <elebescond@clever-age.com>
  33   * @access    public
  34   */
  35  class BD_articleListData_mysql extends BD_articleListData {
  36  
  37      // {{{ constructor
  38  
  39      /**
  40       * Constructor
  41       * @access public
  42       */
  43  	function BD_articleListData_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          $this->_queries[ARTICLES_TOCOME] = "SELECT id_article, surtitre, titre, soustitre, descriptif, chapo, date_heure, visites, id_rubrique, statut " . "FROM " . $GLOBALS['table_prefix']. "_articles WHERE statut='publie' AND date_heure > NOW() ORDER BY date_heure";
  60          $this->_queriesCount[ARTICLES_TOCOME] = "SELECT count(id_article) " . "FROM " . $GLOBALS['table_prefix']. "_articles WHERE statut='publie' AND date_heure > NOW()";
  61      }
  62  
  63  // }}}
  64  }
  65  ?>


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