I have the following SQLALCHEMY CODE
my_query = db.session.query(Isps.isp_name, Ratings.rating_value,
services.service_name, Service_metric.metric_name)
the above basically translates to this ,when i dump my query
SELECT isps.isp_name AS isps_isp_name, ratings.rating_value
AS ratings_rating_value, services.service_name
AS services_service_name, service_metric.metric_name
AS service_metric_metric_name
FROM isps, ratings, services, service_metric
if i do a for loop on the my_query like this
for data in my_query:
print data.isp_name
this will give me duplicates
ISP1
ISP2
ISP3
ISP1
ISP1
ISP2
ISP3
ISP1
AND so on and so on.
my guess its looping through the other tables as well there by giving me duplicates
NB:THESE TABLES ARE UNRELATED , I AM SELECTING ALL THE DATA SO I CAN USE IT A DROPDOWNS ON MY FORM
joinsyntax?