Where is country in database?

3 posts / 0 new
Last post
N5DCH
Where is country in database?

I like to query the database directly to harvest certain QSO information for a web page and I've noticed that there does not appear to be a field in the cqrlog_main table for country, yet country appears in the application. So where does it get that from? Where could I find country in the database? How can I query to retrieve it?

Thanks!
Dave

oh1kh
Where is country in database?

HI Dave!

A qso record's country is a number in column cqrlog_main:adif

With that number you can peek to table dxcc_id

MariaDB [cqrlog001]> show columns in dxcc_id;

+----------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+--------------+------+-----+---------+----------------+
| id_dxcc | int(11) | NO | PRI | NULL | auto_increment |
| adif | int(11) | YES | MUL | 0 | |
| dxcc_ref | varchar(16) | NO | | NULL | |
| country | varchar(100) | NO | | NULL | |
+----------+--------------+------+-----+---------+----------------+
4 rows in set (0.001 sec)

--
Saku
OH1KH

N5DCH
Thank you, Saku!

That was exactly what I needed. :-)

Dave, N5DCH