I would creating a table with this result
Countryname graadtech graadboul
Belgium France Sportclimbing France Sportclimbing
France France Sportclimbing Fontainbleau Boldering
Spain France Sportclimbing
....
USA United states Sportclimbing United States, Hueco, Boldering
...
When I use my query the second table is an exact copy of graadtech
Can someone help me
Thanks
$queryselection = "landen.land_id, landen.land_naam ,Cot.Cot_opm ,Cot.Cot_opm ";
$query = "SELECT $queryselection FROM landen LEFT JOIN Cot ON landen.graadtech = Cot.Cot_id or landen.graadboul = Cot.Cot_id";
Table structure for table Cot
Cot_id int(5) NOT NULL auto_increment,
cot_naam varchar
Cot_opm varchar
PRIMARY KEY (Cot_id)
(1, 'Cot_FR', 'France Sportclimbing');
(2, 'Cot_US', 'United states Sportclimbing');
(3, 'Cot_ZA', 'Zuid-afrika Sportclimbing');
(4, 'Cot_UIAA', 'Internationaal Sportclimbing');
(5, 'Cot_BH', 'United States, Hueco, Boldering');
(6, 'Cot_BF', 'Fontainbleau Boldering');
(7, 'Cot_BP', 'Great Brittan, Peak, Boldering');
(8, 'Cot_AU', 'Australia Sportclimbing');
(9, 'Cot_GB', 'Great Brittan Sportclimbing');
Table structure for table landen
land_id int(11) NOT NULL auto_increment,
land_naam varchar(255) NOT NULL default '',
graadtech tinyint(4) NOT NULL default '0',
graadboul tinyint(4) NOT NULL default '0',
PRIMARY KEY (land_id)
(1, 'Belgium', 1, 1);
(2, 'France', 1, 6);
(3, 'Spain', 1, 0);
(4, 'Madagascar', 1, 0);
(5, 'Greece', 1, 0);
(6, 'Germany', 4, 0);
(7, 'Italy', 1, 0);
(8, 'Sweden', 0, 0);
(9, 'Poland', 0, 0);
(10, 'Japan', 0, 0);
(11, 'USA', 2, 5);
(12, 'Switzerland', 1, 0);
(13, 'South Africa', 3, 0);
(14, 'Austria', 0, 0);
(15, 'Australia', 8, 0);
(16, 'Chile', 0, 0);