[Typo3-dev] valid in Pid in ext_tables_static+adt.sql

Ursula Klinger klinger at punkt.de
Mon Jul 26 11:55:58 CEST 2004


Hi,

I have prepared an extension containing the ISO-3166 country code list,
so you can use it in e.g. a select box in the feuser form.

Now my problem: I dont know what to do with the pid.
Because if there is no valid pid in the INSERT query,
there are no values in the selection box in the feuser backend form.
If I change the pid of the INSERT query to a available page it is Ok.

The extension for the the ISO country Code list has these files:
ext_tables.sql
ext_emconf.php 
ext_tables_static+adt.sql
ext_icon.gif 
icon_tx_ptisocountry_list.gif
ext_localconf.php 
locallang_db.php
ext_tables.php 
tca.php

in the file ext_tables_static+adt.sql all countries are listed, so by
loading the extension the countries are inserted in the database

Example of ext_tables_static+adt.sql
DROP TABLE IF EXISTS tx_ptisocountry_list;

CREATE TABLE tx_ptisocountry_list (
     uid int(11) unsigned DEFAULT '0' NOT NULL auto_increment,
     pid int(11) unsigned DEFAULT '0' NOT NULL,
     tstamp int(11) unsigned DEFAULT '0' NOT NULL,
     crdate int(11) unsigned DEFAULT '0' NOT NULL,
     cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
     deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
     hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
     varchar(60) DEFAULT '' NOT NULL,
     abbr varchar(3) DEFAULT '' NOT NULL,
     is_eu tinyint(3) unsigned DEFAULT '0' NOT NULL,
     PRIMARY KEY (uid),
     KEY parent (pid)
);

INSERT INTO tx_ptisocountry_list VALUES ('1', '0', '0', '0', '0', '0', 'AFGHANISTAN', 'AF', '0');
INSERT INTO tx_ptisocountry_list VALUES ('2', '0', '0', '0', '0', '0', 'ALBANIA', 'AL', '0');
INSERT INTO tx_ptisocountry_list VALUES ('3', '0', '0', '0', '0', '0', 'ALGERIA', 'DZ', '0');
INSERT INTO tx_ptisocountry_list VALUES ('4', '0', '0', '0', '0', '0', 'ANDORRA', 'AD', '0');
INSERT INTO tx_ptisocountry_list VALUES ('5', '0', '0', '0', '0', '0', 'ANGOLA', 'AO', '0');
INSERT INTO tx_ptisocountry_list VALUES ('6', '0', '0', '0', '0', '0', 'ANGUILLA', 'AI', '0');

Has anyone an idea ?

Thanks

Ursula






More information about the TYPO3-dev mailing list