Contents
- Index
Synchronizing with external database
If there is an external database with players (for club, NBO, ...) then follow the steps below to synchronize its content with Players.- Ask for details of external database to learn what information is available there.
- Decide which fields in Players database will be synchronized, the minimal set is ID, sname and gname.
- Ask administrator of external database to produce on regular basis (eg. every week, after each change, as a script to be run from internet) a text file in the following format:
- First line is a list of field's names from Players to be imported, eg.
ID;sname;gname;rank;loc1;info
separated by semicolons.Each next line for one player, values separated with semicolons, long values quoted by ", eg.
1234;Jan;Kowalski;A;"Kazimierz Dolny";"a member of PZBS"If the mentioned above file is accessible over Internet, then enter link to it using Administrator/Sync with from menuIf this file is delivered using other media (email, pendrive,...) then it should have extension .csv.Click the
button. The program will try to connect to Internet using "Sync with" link, if this not work then the program will ask for .csv file name, then synchronization will be made.NOTE:
- For "polish" Players database synchronization is setup automatically.
- External data should be encoded in the language set during Players database setup.
- Just before synchronization all enteries in Players database with ID<StartID will be deleted, see here.
- Following definition of players table will probably help your external database administrator:
CREATE TABLE `players` (
`ID` INT(7) NOT NULL DEFAULT '0',
`gname` VARCHAR(30) NOT NULL,
`sname` VARCHAR(50) NOT NULL,
`rank` VARCHAR(10) DEFAULT NULL,
`loc1` VARCHAR(20) DEFAULT NULL,
`loc2` VARCHAR(50) DEFAULT NULL,
`info` VARCHAR(40) DEFAULT NULL,
`sex` CHAR(1) DEFAULT NULL,
`age` CHAR(1) DEFAULT NULL,
`flag1` CHAR(1) DEFAULT NULL,
`flag2` CHAR(1) DEFAULT NULL,
PRIMARY KEY (`ID`)
) ENGINE=MYISAM DEFAULT CHARSET=utf8