forked from INTER-Mediator/INTER-Mediator
/
Sample1.php
54 lines (49 loc) · 1.44 KB
/
Sample1.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/*
* INTER-Mediator Ver.@@@@2@@@@ Released @@@@1@@@@
*
* by Masayuki Nii msyk@msyk.net Copyright (c) 2010 Masayuki Nii, All rights reserved.
*
* This project started at the end of 2009.
* INTER-Mediator is supplied under MIT License.
*/
require_once ( 'INTER-Mediator/INTER-Mediator.php');
$tableDefs
= array(
array(
'records' => 1,
'name' => 'person_layout',
'key' => 'id',
'query' => array(
array( 'field'=>'id', 'value'=>'5', 'operator'=>'eq' )),
'sort' => array( array( 'field'=>'id', 'direction'=>'ascend' ),),
),
array(
'name' => 'contact_to',
'key' => 'id',
'foreign-key' => 'person_id',
'repeat-control' => 'insert delete',
),
array(
'name' => 'history_to',
'key' => 'id',
'foreign-key' => 'person_id',
'repeat-control' => 'insert',
),
array(
'name' => 'postalcode',
'query' => array( array( 'field'=>'f9', 'value'=>'落合', 'operator'=>'cn' ) ),
'sort' => array( array( 'field'=>'f3', 'direction'=>'ascend' ),),
),
);
$optionDefs
= array(
'formatter' => array(
array( 'field' => 'contact_to@datetime', 'converter-class' =>'FMDateTime' ),
array( 'field' => 'history_to@startdate', 'converter-class' =>'FMDateTime' ),
array( 'field' => 'history_to@enddate', 'converter-class' =>'FMDateTime' ),
)
);
$dbDefs = array( 'db-class' => 'FileMaker_FX', 'db' => 'TestDB' );
IM_Entry( $tableDefs, $optionDefs, $dbDefs, true );
?>