1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

Using a form submission to query a database table, do a calculation, and return a set of values

Discussion in 'Standard Support' started by LeScruf, Nov 19, 2015.

  1. LeScruf

    LeScruf New Member

    Level: Community
    Hi folks,

    I am looking for help with the logic of writing a custom php script to use a form to query a single table in a database, do a simple calculation on each of the returns from the query, and then display the set of values/returns back to the user in a table.

    The form comprises of four drop-down string fields populated from the table, with an additional number field that the user enters (x).

    One way of looking at this - I know this is perhaps not correct but it serves to explain the objective, is that I want to:
    1. Run a 'filter record' of the four drop-down table field values (number variables) the user selects in the form;
    2. Return four number values (I guess an array) from each of the corresponding records in the table that meet the filter criteria;
    3. Do a preset calculation on each of the returned record arrays using the additional number variable (x) chosen by the user in the form;
    4. Display the results back to the user in a table.

    I have been learning basic php - but trying to figure out how to appropriately approach/structure this challenge (which I am guessing is relatively straight-foward if you know how) is leaving me scratching my head a little.

    If this is too big of a request or meets with the reaction, 'go hire a pro-coder to do it for you', then totally fair enough.

    Or if there are pointers to some useful worked examples to follow, and / or if someone is willing to do a little coaching, then I would be very grateful to sweat a bit, and work it out with a guiding hand.

    I have been looking around, and will continue to do so.

  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    It's the kind of thing we could provide more help with on a Pro sub.

    -- hugh
  3. LeScruf

    LeScruf New Member

    Level: Community
    Hi Hugh, sure thing - I've literally (as of yesterday) just started working with Fabrik - so is it possible to upgrade paying the difference? Or what's appropriate from your perspective?
  4. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Unfortunately we don't have a pro-rated system.

    I'll give you some Pro level help, and just bump up when you renew in a month.

    First thing, fill our http://fabrikar.com/you/my-sites, with the amin URL and login (no need for phpMayAdmin or ftp). It'll make more sense when I can see the form.

    -- hugh

Share This Page