integrator update does not work anymore

  • asm10
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0

asm10 created the topic: integrator update does not work anymore

Hi,

I am administrating a site for a music association. Every year they have a competition with many bands. I use breezing forms to manage applications. To keep the data of every band updated I use the integrator update functionality. I noticed today without changing anything to BreezingForms, that I only get empty rows added to my database table using the update integrator. Important to notice is that this only occurs if the update criteria cannot be met! All data is mapped one to one.

I purchased the Pro version one year ago. Please help me get it running again.
#233109
Attachments:
  • asm10
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0

asm10 replied the topic: integrator update does not work anymore

Since no developer has answered this. I have decided to implement my own integrator.
Here is the example code of my form:
/**
 * Created by PhpStorm.
 * User: Ludwig
 * Date: 20.01.2019
 * Time: 14:28
 */
//Integrationg or updating data in the anmeldungen konzertante wertungsspiele table
$this->execPieceByName('ff_InitLib');
$db = JFactory::getDbo();
$query = $db->getQuery(true)->select('id')->from($db->quoteName('#__anmeldungen_konzertante_wertungsspiele'))->where($db->quoteName('userid') . ' = ' . $db->quote(ff_getSubmit('userId')) . ' AND ' . $db->quoteName('termindatum') . ' = ' . $db->quote(ff_getSubmit('termindatum')));

$db->setQuery($query);
$id = $db->loadResult();
if(is_null($id) || $id == ''){
    //Inserting user entries into database if not entry available
    $columns = array(
       'termindatum',
       'userid',
       'stundenchorteilnahme',
       'wunschspielzeit',
       'anzahlmusiker',
       'dauerzweitesselbstwahlstueck',
       'komponistzweitesselbstwahlstueck',
       'titelzweitesselbstwahlstueck',
       'dauererstesselbstwahlstueck',
       'komponisterstesselbstwahlstueck',
       'titelerstesselbstwahlstueck',
       'dauerselbstwahlstueck',
       'komponistselbstwahlstueck',
       'titelselbstwahlstueck',
       'dauerpflichtstueck',
       'komponistpflichtstueck',
       'titelpflichtstueck',
       'stufe',
       'ortdirigent',
       'ortvorstand',
       'sonstigerverband',
       'emaildirigent',
       'faxdirigent',
       'handydirigent',
       'telefondirigent',
       'plzdirigent',
       'anschriftdirigent',
       'vornamedirigent',
       'namedirigent',
       'emailvorstand',
       'faxvorstand',
       'handyvorstand',
       'telefonvorstand',
       'plzvorstand',
       'anschriftvorstand',
       'vornamevorstand',
       'namevorstand',
       'bezirk',
       'verband',
       'verein'
   );

   $values = array(
       $db->quote(ff_getSubmit('termindatum')),
       $db->quote(ff_getSubmit('userId')),
       $db->quote(ff_getSubmit('stundenchorTeilnahme')),
       $db->quote(ff_getSubmit('wunschspielzeit')),
       $db->quote(ff_getSubmit('anzahlMusiker')),
       $db->quote(ff_getSubmit('dauerZweitesSelbstwahlstueck')),
       $db->quote(ff_getSubmit('komponistZweitesSelbstwahlstueck')),
       $db->quote(ff_getSubmit('titelZweitesSelbstwahlstueck')),
       $db->quote(ff_getSubmit('dauerErstesSelbstwahlstueck')),
       $db->quote(ff_getSubmit('komponistErstesSelbstwahlstueck')),
       $db->quote(ff_getSubmit('titelErstesSelbstwahlstueck')),
       $db->quote(ff_getSubmit('dauerSelbstwahlstueck')),
       $db->quote(ff_getSubmit('komponistSelbstwahlstueck')),
       $db->quote(ff_getSubmit('titelSelbstwahlstueck')),
       $db->quote(ff_getSubmit('dauerPflichtstueck')),
       $db->quote(ff_getSubmit('komponistPflichtstueck')),
       $db->quote(ff_getSubmit('titelPflichtstueck')),
       $db->quote(ff_getSubmit('stufe')),
       $db->quote(ff_getSubmit('ortDirigent')),
       $db->quote(ff_getSubmit('ortVorstand')),
       $db->quote(ff_getSubmit('sonstigerverband')),
       $db->quote(ff_getSubmit('emailDirigent')),
       $db->quote(ff_getSubmit('faxDirigent')),
       $db->quote(ff_getSubmit('handyDirigent')),
       $db->quote(ff_getSubmit('telefonDirigent')),
       $db->quote(ff_getSubmit('plzDirigent')),
       $db->quote(ff_getSubmit('anschriftDirigent')),
       $db->quote(ff_getSubmit('vornameDirigent')),
       $db->quote(ff_getSubmit('nameDirigent')),
       $db->quote(ff_getSubmit('emailVorstand')),
       $db->quote(ff_getSubmit('faxVorstand')),
       $db->quote(ff_getSubmit('handyVorstand')),
       $db->quote(ff_getSubmit('telefonVorstand')),
       $db->quote(ff_getSubmit('plzVorstand')),
       $db->quote(ff_getSubmit('anschriftVorstand')),
       $db->quote(ff_getSubmit('vornameVorstand')),
       $db->quote(ff_getSubmit('nameVorstand')),
       $db->quote(ff_getSubmit('bezirk')),
       $db->quote(ff_getSubmit('verband')),
       $db->quote(ff_getSubmit('vereinsName'))
   );

   $query = $db->getQuery(true)->insert($db->quoteName('#__anmeldungen_konzertante_wertungsspiele'))->columns($db->quoteName($columns))->values(implode(',', $values));

    $db->setQuery($query);
    $db->execute();
}
else{
    //Updating user entries
    $fields = array(
        $db->quoteName('stundenchorteilnahme') . ' = ' . $db->quote(ff_getSubmit('stundenchorTeilnahme')),
        $db->quoteName('wunschspielzeit') . ' = ' . $db->quote(ff_getSubmit('wunschspielzeit')),
        $db->quoteName('anzahlmusiker') . ' = ' . $db->quote(ff_getSubmit('anzahlMusiker')),
        $db->quoteName('dauerzweitesselbstwahlstueck') . ' = ' . $db->quote(ff_getSubmit('dauerZweitesSelbstwahlstueck')),
        $db->quoteName('komponistzweitesselbstwahlstueck') . ' = ' . $db->quote(ff_getSubmit('komponistZweitesSelbstwahlstueck')),
        $db->quoteName('titelzweitesselbstwahlstueck') . ' = ' . $db->quote(ff_getSubmit('titelZweitesSelbstwahlstueck')),
        $db->quoteName('dauererstesselbstwahlstueck') . ' = ' . $db->quote(ff_getSubmit('dauerErstesSelbstwahlstueck')),
        $db->quoteName('komponisterstesselbstwahlstueck') . ' = ' . $db->quote(ff_getSubmit('komponistErstesSelbstwahlstueck')),
        $db->quoteName('titelerstesselbstwahlstueck') . ' = ' . $db->quote(ff_getSubmit('titelErstesSelbstwahlstueck')),
        $db->quoteName('dauerselbstwahlstueck') . ' = ' . $db->quote(ff_getSubmit('dauerSelbstwahlstueck')),
        $db->quoteName('komponistselbstwahlstueck') . ' = ' . $db->quote(ff_getSubmit('komponistSelbstwahlstueck')),
        $db->quoteName('titelselbstwahlstueck') . ' = ' . $db->quote(ff_getSubmit('titelSelbstwahlstueck')),
        $db->quoteName('dauerpflichtstueck') . ' = ' . $db->quote(ff_getSubmit('dauerPflichtstueck')),
        $db->quoteName('komponistpflichtstueck') . ' = ' . $db->quote(ff_getSubmit('komponistPflichtstueck')),
        $db->quoteName('titelpflichtstueck') . ' = ' . $db->quote(ff_getSubmit('titelPflichtstueck')),
        $db->quoteName('stufe') . ' = ' . $db->quote(ff_getSubmit('stufe')),
        $db->quoteName('ortdirigent') . ' = ' . $db->quote(ff_getSubmit('ortDirigent')),
        $db->quoteName('ortvorstand') . ' = ' . $db->quote(ff_getSubmit('ortVorstand')),
        $db->quoteName('sonstigerverband') . ' = ' . $db->quote(ff_getSubmit('sonstigerverband')),
        $db->quoteName('emaildirigent') . ' = ' . $db->quote(ff_getSubmit('emailDirigent')),
        $db->quoteName('faxdirigent') . ' = ' . $db->quote(ff_getSubmit('faxDirigent')),
        $db->quoteName('handydirigent') . ' = ' . $db->quote(ff_getSubmit('handyDirigent')),
        $db->quoteName('telefondirigent') . ' = ' . $db->quote(ff_getSubmit('telefonDirigent')),
        $db->quoteName('plzdirigent') . ' = ' . $db->quote(ff_getSubmit('plzDirigent')),
        $db->quoteName('anschriftdirigent') . ' = ' . $db->quote(ff_getSubmit('anschriftDirigent')),
        $db->quoteName('vornamedirigent') . ' = ' . $db->quote(ff_getSubmit('vornameDirigent')),
        $db->quoteName('namedirigent') . ' = ' . $db->quote(ff_getSubmit('nameDirigent')),
        $db->quoteName('emailvorstand') . ' = ' . $db->quote(ff_getSubmit('emailVorstand')),
        $db->quoteName('faxvorstand') . ' = ' . $db->quote(ff_getSubmit('faxVorstand')),
        $db->quoteName('handyvorstand') . ' = ' . $db->quote(ff_getSubmit('handyVorstand')),
        $db->quoteName('telefonvorstand') . ' = ' . $db->quote(ff_getSubmit('telefonVorstand')),
        $db->quoteName('plzvorstand') . ' = ' . $db->quote(ff_getSubmit('plzVorstand')),
        $db->quoteName('anschriftvorstand') . ' = ' . $db->quote(ff_getSubmit('anschriftVorstand')),
        $db->quoteName('vornamevorstand') . ' = ' . $db->quote(ff_getSubmit('vornameVorstand')),
        $db->quoteName('namevorstand') . ' = ' . $db->quote(ff_getSubmit('nameVorstand')),
        $db->quoteName('bezirk') . ' = ' . $db->quote(ff_getSubmit('bezirk')),
        $db->quoteName('verband') . ' = ' . $db->quote(ff_getSubmit('verband')),
        $db->quoteName('verein') . ' = ' . $db->quote(ff_getSubmit('vereinsName'))
    );

    $query->update($db->quoteName('#__anmeldungen_konzertante_wertungsspiele'))->set($fields)->where($db->quoteName('userid') . ' = ' . $db->quote(ff_getSubmit('userId')) . ' AND ' . $db->quoteName('termindatum') . ' = ' . $db->quote(ff_getSubmit('termindatum')));
    $db->setQuery($query);
    $db->execute();
}
You would need to insert your modifed code into the "on end of submit" text field of your form!
#233628
Moderators: ForumSupporttomeperica
Time to create page: 0.039 seconds

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99€

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

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!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here