× If you expect answers you should describe your problem and give as much information's as possible. (SQL-Structure, Template Code, Joomla Version ...) Please read this before posting: joodb.feenders.de/support.html

Linked tables can't get it to work

More
7 years 3 months ago #4273 by m.j.baas.ziggo
Linked tables can't get it to work was created by m.j.baas.ziggo
I want when someone click on a country they will see all the parks in that country.
The problem is it doens't work maybe because I am new with Joodb.
Can some one please help me.

I have to tables in in my database.
a table with the name: Landen
With the following information

id Land korte omschrijving
1 Nederland
2 Duitsland
3 Belgie
4 Frankrijk


And an table with the name: Parken
With the following information
id Park korte omschrijving Omschrijving Land
1 Walibi Holland Nederland
2 Duinrell Nederland
3 Efteling Nederland
4 Slagharen Nederland

Thanks for al the help in advance

Please Log in to join the conversation.

More
7 years 3 months ago #4274 by Dirk
Replied by Dirk on topic Linked tables can't get it to work
You can add search variables to the catalog of the database with the parcs.

Like this
https://YOUR-DOMAIN/parcs.html?searchfield=country&search=germany

All you have to to is to add the value with the county-name to your url

Like this
<a href="https://YOUR-DOMAIN/parcs.html?searchfield=country&search={joodb field|country}">{joodb field|country}</a>

It seems to me that you do not need the second table.
Normally you don't write the complete Value of the connected table.
You just have a number (id) of the related field in the second table.

Parks.id_country => Countries.id :: Countries.name

Please Log in to join the conversation.

Moderators: Dirkjoest