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
https://forums.phpfreaks.com/topic/212853-get-data-from-another-database/
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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.