1 | <?php |
---|
2 | |
---|
3 | |
---|
4 | // |
---|
5 | // Structure des tables |
---|
6 | // |
---|
7 | |
---|
8 | if (!defined("_ECRIRE_INC_VERSION")) return; |
---|
9 | |
---|
10 | function continents_declarer_tables_interfaces($interface){ |
---|
11 | |
---|
12 | |
---|
13 | |
---|
14 | //-- Table des tables ---------------------------------------------------- |
---|
15 | |
---|
16 | $interface['table_des_tables']['continents']='continents'; |
---|
17 | |
---|
18 | return $interface; |
---|
19 | } |
---|
20 | |
---|
21 | function continents_declarer_tables_principales($tables_principales){ |
---|
22 | $spip_continents = array( |
---|
23 | "id_continent" => "SMALLINT NOT NULL", |
---|
24 | "nom" => "varchar(255) NOT NULL", |
---|
25 | "code_onu" => "SMALLINT NOT NULL", |
---|
26 | "latitude" => 'text not null default ""', |
---|
27 | "longitude" => 'text not null default ""', |
---|
28 | "zoom" => 'text not null default ""', |
---|
29 | "maj" => "TIMESTAMP"); |
---|
30 | |
---|
31 | $spip_continents_key = array( |
---|
32 | "PRIMARY KEY" => "id_continent", |
---|
33 | "KEY code_onu" => "code_onu", |
---|
34 | ); |
---|
35 | |
---|
36 | |
---|
37 | $tables_principales['spip_continents'] = array( |
---|
38 | 'field' => &$spip_continents, |
---|
39 | 'key' => &$spip_continents_key, |
---|
40 | 'join'=> array( |
---|
41 | 'id_continent' => 'id_continent' |
---|
42 | ) |
---|
43 | ); |
---|
44 | |
---|
45 | $tables_principales['spip_pays']=array( |
---|
46 | 'field'=>array('id_continent'=>"SMALLINT NOT NULL"), |
---|
47 | 'key'=>array('KEY id_continent'=>"id_continent"), |
---|
48 | 'join'=>array('id_continent'=>"id_continent"), |
---|
49 | ); |
---|
50 | |
---|
51 | return $tables_principales; |
---|
52 | } |
---|
53 | |
---|
54 | |
---|
55 | ?> |
---|