Copy link to clipboard
Copied
I have created a SELECT statement in the Advanced area and when I press the Testing button it works perfectly but if I click ok I see other fields selected in the Bindings panel. Why isn't this working in the Bindings panel? It is not selecting the outer statement just the one between parentheses.
SELECT cit.city, providd.base_city
FROM (
SELECT prov.id AS prov_id, prov.company_name, prov.description AS prov_description, prov.photo, prov.base_city, prov.facebook, prov.twitter, cat.id AS cat_id, pcc.city_id
FROM `providers` AS prov
LEFT JOIN `provider_city_category` AS pcc ON prov.id = pcc.provider_id
LEFT JOIN `categories` AS cat ON pcc.category_id = cat.id
WHERE cat.id =7
AND pcc.city_id =1) AS providd, cities cit
WHERE providd.base_city = cit.id
LIMIT 1
When I test I see selected:
the cit.city and providd.base_city
(just as I want)
But if I save and look in the Bindings Panel I have these fields:
prov_id
company_name
prov_description
photo
base_city
cat_id
city_id
__________________
I'm using DW CS6
Copy link to clipboard
Copied
If I recall correctly, derived tables are not supported in DW. You may just need to code this by hand.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now