[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program 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. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 * 18 * $Id: critique.class.php,v 1.4 2005/07/09 14:34:44 eldy Exp $ 19 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/product/critiques/critique.class.php,v $ 20 * 21 */ 22 23 class Critique { 24 var $db ; 25 26 var $id ; 27 var $nom; 28 29 function Critique($DB, $id=0) { 30 $this->db = $DB; 31 $this->id = $id ; 32 } 33 /* 34 * 35 * 36 * 37 */ 38 function fetch ($id) { 39 40 41 $sql = "SELECT r.reviews_id, r.reviews_rating, d.reviews_text, p.products_name"; 42 43 $sql .= " FROM ".OSC_DB_NAME.".reviews as r, ".OSC_DB_NAME.".reviews_description as d"; 44 $sql .= " ,".OSC_DB_NAME.".products_description as p"; 45 46 $sql .= " WHERE r.reviews_id = d.reviews_id AND r.products_id=p.products_id"; 47 $sql .= " AND p.language_id = ".OSC_LANGUAGE_ID. " AND d.languages_id=".OSC_LANGUAGE_ID; 48 $sql .= " AND r.reviews_id=$id"; 49 50 $result = $this->db->query($sql) ; 51 52 if ( $result ) 53 { 54 $result = $this->db->fetch_array(); 55 56 $this->id = $result["reviews_id"]; 57 $this->product_name = stripslashes($result["products_name"]); 58 $this->text = stripslashes($result["reviews_text"]); 59 60 $this->db->free(); 61 } 62 else 63 { 64 print $this->db->error(); 65 print "<p>$sql"; 66 } 67 68 return $result; 69 } 70 71 } 72 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |