TOPIC:

Database queries 1 month 4 days ago #247047

  • Topic Author
  • ooc
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 221
  • Thanks: 1
I have a project that involves having the user select a time slot from a given set. Each time slot has a maximum number of people so the form/program needs to consult the database to see if the timeslot is available or full. As I see it this means creating a database table which collects data from entries from the form then doing a query of the nature of select count, maximum from table where time = timeslot . Then testing If count = maximum give error - That slot is full. Please select another timeslot.

I haven't done any sql for many years but have friends who can help but before I try is my plan feasible? Can the js in an actionscript query and update a db table?

You once had a set of forms contributed by your community posted as suggestions as to how Breezingforms can be used. I don't see that on the website any longer but was wondering if there are any examples of forms querying the database.

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

Database queries 1 month 3 days ago #247078

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10063
  • Karma: 167
  • Thanks: 799
Hi,

yes, in this thread, you find a boilerplate ready-made form for purposes like this:

crosstec.org/en/forums/3-breezingforms-f...-options.html#241236

The form pulls data from the db through an ajax call and populates some fields.

Feel free to change it to fit your requirements.

Regards,
Markus

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

Database queries 1 month 1 day ago #247120

  • Topic Author
  • ooc
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 221
  • Thanks: 1
Thank you MarkusWhat you have sent has convinced me this can be done. However, I am running into errors in trying to modify the form you sent to my needs particularly with the php code. Could you please have a look. I am attaching the form as it is now and a document describing what the form is doing and the sql statements that I feel are needed. All sql statements have been tested in phpMyAdmin. If you need access to the backend I can send signon specifics.
Lorna

File Attachment:

File Name: eventregistration.zip
File Size:13 KB

File Attachment:

File Name: EventRegis...23-2.zip
File Size:5 KB
Attachments:

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

Database queries 1 month 21 hours ago #247188

  • Topic Author
  • ooc
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 221
  • Thanks: 1
I have tried one thing more - replacing the Before Form script with the one found in crosstec.org/en/support/online-documenta...ct-list-from-db.html . That results in " 0 - syntax error, unexpected '$db' (T_VARIABLE)" -
I think if I could just get past this initial point I'd be able to move on but am very frustrated with this first step. Please help.

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

Database queries 4 weeks 2 days ago #247233

  • Topic Author
  • ooc
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 221
  • Thanks: 1
I have just renewed my support subscription. I am hoping that will give this post an urgent response. We are hoping to get our club active again following COVID protocols and this is needed to meet these needs.

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

Database queries 4 weeks 2 days ago #247266

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10063
  • Karma: 167
  • Thanks: 799
Hi,

can you please post your actual code? I know you copy and pasted most of it from there, but the error suggest a syntax issue, that's why I need to see what you actually have there.

Please use the bb code tag feature in your next post when you post the code.

Regards,
Markus

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

Time to create page: 0.053 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!