Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

SELECT statement working when testing but not in Bindings Panel

New Here ,
Nov 14, 2013 Nov 14, 2013

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

facebook

twitter

cat_id

city_id

__________________

I'm using DW CS6

TOPICS
Server side applications
501
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 14, 2013 Nov 14, 2013
LATEST

If I recall correctly, derived tables are not supported in DW. You may just need to code this by hand.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines