Skip to Content Skip to Menu

MySQ

  • bmeeker
  • bmeeker
  • OFFLINE
  • Posts: 65
  • Thanks: 8
  • Karma: 1
2 years 1 week ago #331605 by bmeeker
MySQ was created by bmeeker
How do I separate the Hypertext Name and URL Address of a Website field in a query?
Looks like the delimiter is |*| and I don't see that on the Delimiter options on the Query Display tab using single column.
Is there an SQL Select command or some way I can separate these to show as separate query results (one for Hypertext, one for URL address)?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
2 years 1 week ago #331616 by krileon
Replied by krileon on topic MySQ
Use SQL and split it. See the below for MySQL string function documentation. Easiest approach is probably just a REGEXP. You could also find location of the |*| delimiter then use SUBSTR, LTRIM, etc.. usages.

dev.mysql.com/doc/refman/5.7/en/string-functions.html


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.

  • bmeeker
  • bmeeker
  • OFFLINE
  • Posts: 65
  • Thanks: 8
  • Karma: 1
2 years 1 week ago #331620 by bmeeker
Replied by bmeeker on topic MySQ
I've tried and failed. I assumed the SQL guery goes in the Query box, but what do I put in the row to display?

BTW - the SQL link is great, but only for those who really know SQL - I do not.

Any help from anyone would be greatly appreciated.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
2 years 1 week ago #331626 by krileon
Replied by krileon on topic MySQ
I cannot help you with writing custom SQL without a Business Membership , sorry. That fields purpose is to output the results of a custom database query. If you don't know how to write database queries it's going to be difficult for you to use it.

Why exactly are you needing to do query for user field data? You should be able to just output fields normally using substitutions.


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.

  • bmeeker
  • bmeeker
  • OFFLINE
  • Posts: 65
  • Thanks: 8
  • Karma: 1
2 years 1 week ago #331640 by bmeeker
Replied by bmeeker on topic MySQ
Thanks for your reply.

If I do get the SQL written, I still am not sure what goes in the Display's Row box.
Normally I would do [column_cb_urlofwebsite], but does that work when SQL statement is separating the field?

I have three groups, Staff that can edit profiles.
Client and Carriers are other the other 2 groups.
The Clients and Carriers are maintained by Staff.
Staff needs to be able to see Carrier info in a Client's profile, but not be able to edit it while in Client's profile. But can edit it in Carrier's profile.
So a query of the Carrier's field shown in the Client's profile works great.
I need it for the Carrier's Phones, URL and Street Addresses.
For Phones and Addresses, I create separate fields for labels.
Had done URL with label field also in past, but with option to add Hypertext label to the URL field, I thought I'd be able to do away with a separate URL label.

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

  • bmeeker
  • bmeeker
  • OFFLINE
  • Posts: 65
  • Thanks: 8
  • Karma: 1
2 years 1 week ago #331642 by bmeeker
Replied by bmeeker on topic MySQ
I got it figured out.
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum