We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

MySQL Stored Procedures - Need Help Getting Started...

Development and Programming

MacMastermind's avatar
MacMastermind
118 posts
15 years ago
MacMastermind's avatar MacMastermind

My ultimate goal is to trigger a stored procedure when saving a record from a stand-alone entry form on a template. The stored procedure would basically take data that was just saved, compare it to other channels’/tables’ existing values and insert corresponding values into other blank fields inside the same record.

For example, my form asks you to choose 1, 2 or 3 (we’ll call this field_1 on my SAEF). If you choose ‘1’, then when you hit ‘Submit’, there would be some kind of trigger (like an empty field value or a pre-stored field value) that would launch a stored procedure in the database to query another table - using the ‘1’ entered by you - and insert the result into field_2 and re-save the record (if necessary).

So, based on the value you choose, another value is found and saved in another field in that same record…

Can someone get me started with some sort of example of a stored procedure in MySQL and maybe a trigger method? Something simple is fine, as long as I can grasp the concept of what is happening…

-Tony

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.