Skip to Content Skip to Menu

Cb query issue

  • crony
  • crony
  • OFFLINE
  • Posts: 104
  • Thanks: 7
  • Karma: 1
2 years 3 months ago #330427 by crony
Replied by crony on topic Cb query issue
Ok !
This
Code:
SELECT  DISTINCT `country_iso_code2`, `province_name` FROM `#__comprofiler_provinces` WHERE`country_iso_code2`= '[cb_country]'
Works perfect !
Better to work at dawn, fresh mind...

J! 4.x - CB 2.7.3
The following user(s) said Thank You: krileon

Please Log in or Create an account to join the conversation.

  • crony
  • crony
  • OFFLINE
  • Posts: 104
  • Thanks: 7
  • Karma: 1
2 years 3 months ago #330430 by crony
Replied by crony on topic Cb query issue
Oups...Sorry, it almost work...
I have all the states field, not just the one selected... 

J! 4.x - CB 2.7.3

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
2 years 3 months ago #330432 by krileon
Replied by krileon on topic Cb query issue
Again, copy and paste the solution from our demo site. You have a fully functioning example that you can freely explore there. I have no idea what else to advice you on in this regard. We also have the below tutorial, which is old but still valid.

www.joomlapolis.com/documentation/345-cb-query-field/tutorials/18533-configuring-dynamic-usa-state-city-zip-fields-with-cb-query-field-plugin


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • crony
  • crony
  • OFFLINE
  • Posts: 104
  • Thanks: 7
  • Karma: 1
2 years 3 months ago - 2 years 3 months ago #330437 by crony
Replied by crony on topic Cb query issue
I did all that, during hours...
May I suggest a demo website up to date ?
I mean using the comprofiler_countries and comprofiler_provinces tables as they are provided natively, I suppose they are also on this demo website, but they're not used for the demo, so I suppose an exemple related to the actual version would be usefull for me, and I suppose for some others, even you, as you wouldn't have to answer to this message.
Problem is I have absolutely no view on the database of the demo site, so it's a bit hard to guess what I'm missing here.

Also, into CB Core Field Ajax / General / Display Empty Update On, while set to disable, I suppose I should not see the field if there's no data right ? So, here I always see the field if there's no state.
Should I understand things differently ?

I've got a single query dropdown, how should I get all the states of the entries ?
 

J! 4.x - CB 2.7.3
Last edit: 2 years 3 months ago by crony.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
2 years 3 months ago #330439 by krileon
Replied by krileon on topic Cb query issue
Those tables are not native to CB. They're provided by CBSubs, which is why we provide an example not dependent on CBSubs. An example of how to query those tables using CB Query Field is in the Query Autocomplete under Integrations > CB Query Field of the following fields.

cb_address_country
cb_address_state

You can adapt these to used for query select if you so choose. Below are some topics doing exactly that.

www.joomlapolis.com/forum/developer-members-support/240757-query-drop-down-single-select-displaying-value-not-label-after-update?start=6#311513

www.joomlapolis.com/forum/cb-paid-subscriptions-support/241845-cbsubs-invoice-fields-problem#315497

www.joomlapolis.com/forum/developer-members-support/236894-solved-mapping-of-address-fields-to-cbsubs-not-working?start=0#295537


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • crony
  • crony
  • OFFLINE
  • Posts: 104
  • Thanks: 7
  • Karma: 1
2 years 3 months ago #330441 by crony
Replied by crony on topic Cb query issue
Well, thanks for pointing additionnal ressources, at some point I'll find my way...
In the meantime, I doubt arguing that CB sub does not natively belong to CB, and say that is the reason why you're not providing example to fully connect them together, on the website of the creator of CB and CB sub, is a good call. 

J! 4.x - CB 2.7.3

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum