Quick Search:

View

Revision:

Diff

Diff from 219 to:

Annotations

Annotate by Age | Author | Mixed | None
/fisheye/browse/osCommerce/trunk/oscommerce/includes/classes/manufacturer.php

Annotated File View

hpdl
208
1 <?php
2 /*
3   $Id: account.php 207 2005-09-26 01:29:31 +0200 (Mo, 26 Sep 2005) hpdl $
4
5   osCommerce, Open Source E-Commerce Solutions
6   http://www.oscommerce.com
7
8   Copyright (c) 2005 osCommerce
9
10   Released under the GNU General Public License
11 */
12
13   class osC_Manufacturer {
14     var $_data = array();
15
16     function osC_Manufacturer($id) {
17       global $osC_Database;
18
hpdl
219
19       $Qmanufacturer = $osC_Database->query('select manufacturers_id as id, manufacturers_name as name, manufacturers_image as image from :table_manufacturers where manufacturers_id = :manufacturers_id');
hpdl
208
20       $Qmanufacturer->bindTable(':table_manufacturers', TABLE_MANUFACTURERS);
21       $Qmanufacturer->bindInt(':manufacturers_id', $id);
22       $Qmanufacturer->execute();
23
24       if ($Qmanufacturer->numberOfRows() === 1) {
25         $this->_data = $Qmanufacturer->toArray();
26       }
27     }
28
hpdl
219
29     function getID() {
30       if (isset($this->_data['id'])) {
31         return $this->_data['id'];
32       }
33
34       return false;
35     }
36
hpdl
208
37     function getTitle() {
38       if (isset($this->_data['name'])) {
39         return $this->_data['name'];
40       }
41
42       return false;
43     }
44
45     function getImage() {
46       if (isset($this->_data['image'])) {
47         return $this->_data['image'];
48       }
49
50       return false;
51     }
52   }
53 ?>