Jump to content

Get data from another database


flyboeing

Recommended Posts

Hello all,

I am currently making a movements database for my aviation photos. In this database a store all the data: registration, airport, etc.

Here is how it looks like:

+--------------+---------+---------+
| Registration | Airport | Airline |
+--------------+---------+---------+
|   PH-BQA     |  EHAM   |  KLM    |
+--------------+---------+---------+

I also have a database with all the airport stored in it:

+----+------+---------------------------------+
| ID | ICAO | Airport                         |
+----+------+---------------------------------+
| 1  | EHAM | Amsterdam Schiphol (EHAM / AMS) |
+----+------+---------------------------------+

I want to make it like this:

When I hover my mouse over the EHAM, I want to show the full airport name (that is stored in database 2).

How can I make this? I am not that familiar with php/mysql...

 

Thanks in advance!

Link to comment
Share on other sites

I made a mistake in my question, it is not about 2 databases, it is 1 database with 2 tables. In the first table is de main information. The second table contains only the airport information. On my webpage only the ICAO code (4-letter) code is visible. When you hover over the 4-letter code, I want to show the compleet airport name.

 

The hovering thing is already working for some other elements, but to get the full airport name from another table, I can't get that to work.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.