Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount! Get 20% off now with code SPOOKY-2024!

[SOLVED] DBlookUp - where to write in the phrase?

  • mapache64
  • mapache64
  • OFFLINE
  • Posts: 42
  • Thanks: 3
  • Karma: 0
11 years 9 months ago - 11 years 9 months ago #219239 by mapache64
Hey,
I have the subject to make a registration for people, who got an Invitation by Post with a Invitation-Code. So I thought, dblookup was the right Plugin.

But now I try to configure it. I show in on the registrationform, o.k. And I submitted the [value] with my invitation code, but it gave out an error: "Cannot execute Mandatory SQL query check". So perhpas I thought wrong with changeing the [value].
Please can you give me a short explanation....
greetings Mapache

I use the msql-string:
SELECT * FROM ` j17_comprofiler_fields` WHERE `code`= '[cb_invitationcode]' AND `userid` = '0'

cb_invitationcode is a textfield in the database I gave a standard value which is my Invitationcode...
Last edit: 11 years 9 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48454
  • Thanks: 8280
  • Karma: 1443
11 years 9 months ago #219256 by krileon
Replied by krileon on topic DBlookUp - where to write in the phrase?
Don't understand what you're trying to do. The _comprofiler_fields database is just a table to CB fields and their parameters. User data is stored to _comprofiler.

DB Lookup checks your supplied values and query against the database to see if it's valid. It's basically database based validation for a field. If you want to pull and display a value from database then you'd use CB Query Field.


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.

  • mapache64
  • mapache64
  • OFFLINE
  • Posts: 42
  • Thanks: 3
  • Karma: 0
11 years 9 months ago #219326 by mapache64
Replied by mapache64 on topic DBlookUp - where to write in the phrase?
O.K. perhaps I tried the wrong way.
My job is to send to 500 people a letter with a code. With this code they can registrate on the website.

I now try it with the invite-Plugin. Perhaps it fits better, because I noticed that the dblookup-PlugIn uses one code only one time....

Thanks
Mapache

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48454
  • Thanks: 8280
  • Karma: 1443
11 years 9 months ago #219364 by krileon
Replied by krileon on topic DBlookUp - where to write in the phrase?
Either plugin will do the task, but CB Invites will make it much easier. Basically with CB invites set the invite_code field as required and to display on registration. This means they won't be able to register without an invite code. You can then easily from frontend supply a comma separated list of email addresses (or 1 by 1 if you want and depending on configuration) send those users an invite email.

With DB Lookup you need to have a database where you store the 500 unique codes. You would then setup DB Lookup to compare its value against that table to validate their invite code. You'd then need to manually email them the codes after ensuring is working. This doesn't prevent a code from being used multiple times though so that could be a problem unless you implement something to delete the code or set a column in database so it's not used again in your validation query.


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.

  • mapache64
  • mapache64
  • OFFLINE
  • Posts: 42
  • Thanks: 3
  • Karma: 0
11 years 9 months ago #219369 by mapache64
Replied by mapache64 on topic DBlookUp - where to write in the phrase?
Thanks a lot for your help. I solved it this way now with dblookup. The Problem is, I don't have the Emailadresses of the people. They will get a letter with a code. And all codes are the same.
So I made a codetable with 500 times the same code. After one has registrated the code gets an userID-relation. First I thought is it possible to make just one entry in the covetable, but it gave out an error.

But for the first, I can go on working with this solution.
Thanks
Mapache

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

Moderators: beatnantkrileon
Powered by Kunena Forum