Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

adding data from access db to map

Posted on 2014-02-02
7
Medium Priority
?
300 Views
Last Modified: 2014-03-24
I have a website I am creating as a hobby. I have a database in access 2013 that countains totals of people that left Dover in the uk and the country they are now residing in. How can I add a textfield at the end waypoint with the total for that country from the database.

In the map example the waypoints go from Dover to Spain.

Spain has 6 people in total residing there from Dover:

Country      Number of People
Spain                  6

How do I write the code to add that [number of people] field?

I could migrate the db to mysql if required.
0
Comment
Question by:PeterBaileyUk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 39827891
Please show us the table structure, thanks.
0
 

Author Comment

by:PeterBaileyUk
ID: 39827915
ok see the attached
Capture.PNG
0
 
LVL 29

Expert Comment

by:fibo
ID: 39828097
You presumably want the query that would show the info you want...

I first I understodd you query as "I want to add a column which will hold the number of people that came to this country"... but since number is goind g to change over time you do not want it "hard data".

From your capture it seems that you already have built the query, which in SQL would probably translate as
SELECT TblCountry.country, count(TblNames.AutoID) number
FROM TblCountry
JOIN TblNames
ON TblCountry.ID=TblNames.CountryID
GROUP BY TblCountry.country
ORDER BY number DESC

Open in new window

(you can check that in Acess by asking to display your query in SQL)
0
Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

 
LVL 111

Expert Comment

by:Ray Paseur
ID: 39828305
Full Disclosure: I have not tested this query.  But I think this would be the MySQL version (note the use of AS in the query string).  If it's not right, it's pretty close :-)

SELECT TblCountry.country AS country, count(TblNames.AutoID) AS number
FROM TblCountry
JOIN TblNames
ON TblCountry.ID=TblNames.CountryID
GROUP BY country
ORDER BY number DESC

Open in new window

0
 

Author Comment

by:PeterBaileyUk
ID: 39828919
ok so as I understand it once I migrate the data to mysql tables it will allow me to extract the data with the new query and add the field in the web page or my case i believe will be a geotag.
0
 
LVL 29

Accepted Solution

by:
fibo earned 2000 total points
ID: 39828963
No no... we did not say you SHOULD migrate your data to MySQL.
You can build and run SQL queries with Access. Access'SQL is at times different from "regular MySQL" (eg for *%_) but the SQL query given above will probably work as si or with slight changes into Access.
Within Access, create a new query. By default you will be presented the QBE (Query By Example) scrren which makes easy for you to build 99% of the queries you nééed? Look at the buttion on top left: it allows you to build the query (with QBE) or to run it... but there is a 3rd option there, "SQL" which
- allows you to the the "Access SQL" equivalent of your QBE query
- allows you to type in a "presumably Access" SQL query which you can then run; in most situations you will also be able to display the QBE version of this SQL text, but in some cases this will not be possible althought the query is correct and runs fine (QBE does not cover the full SQL space)
0
 

Author Comment

by:PeterBaileyUk
ID: 39843759
I already had created the query, just wanted to know how I get the data from query into my wordpress blog.

SELECT TblCountry.Country, Count(TblNames.CountryID) AS [Number of People]
FROM TblCountry LEFT JOIN TblNames ON TblCountry.ID = TblNames.CountryID
GROUP BY TblCountry.Country
HAVING (((Count(TblNames.CountryID))>0))
ORDER BY Count(TblNames.CountryID) DESC;

Open in new window

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question