noalyss  Version-6.9.1.8
 All Data Structures Namespaces Files Functions Variables Pages
class_stock_sql.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of NOALYSS.
5  *
6  * NOALYSS is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * NOALYSS is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with NOALYSS; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 
21 // Copyright Author Dany De Bontridder danydb@aevalys.eu
22 
23 /**
24  * @file
25  * @brief
26  *
27  */
28 require_once NOALYSS_INCLUDE.'/database/class_noalyss_sql.php';
29 
30 class Stock_Sql extends Noalyss_SQL {
31  function __construct($cn,$p_id=-1)
32  {
33  $this->table = "public.stock_repository";
34  $this->primary_key = "r_id";
35 
36  $this->name=array(
37  "id"=>"r_id",
38  "name"=>"r_name",
39  "adress"=>"r_adress",
40  "city"=>"r_city",
41  "country"=>"r_country",
42  "phone"=>"r_phone"
43  );
44 
45  $this->type = array(
46  "r_id"=>"numeric",
47  "r_name"=>"text",
48  "r_adress"=>"text",
49  "r_city"=>"text",
50  "r_country"=>"text",
51  "r_phone"=>"text"
52 
53  );
54 
55  $this->default = array(
56  "r_id" => "auto",
57  );
58  global $cn;
59 
60  parent::__construct($cn,$p_id);
61  }
62 }
63 ?>
Match a table into an object, you need to add the code for each table.
__construct($cn, $p_id=-1)
$from_poste name
$input_from type
Definition: balance.inc.php:70
$select_type table