This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

Results that match form in database


  1. rscott7706
    Member

    Hey all...

    I am building an interface that will allow the relatively inexperienced employees of our Lakeside Chamber the ability to upload their newsletter and provide the link to it.

    I will upload the Adobe Acrobat file with a php uploader, not MachForm.

    But, I want to upload the month, Year and Link using MachForm.

    So, I built a form that has a month dropdown, and a year dropdown.

    The drawaback is that the database populates with integers, not the months or years I put in the form.

    For instance, the database will have a 1 in month and 1 in year if I select month - "January" and year "2009" (my first year is 2009).

    I tried to go in to the database and change the structure from int to text, but that did not help (as well as other change to match text).

    Here is the link to form: http://www.lakesideca.com/machform/view.php?id=2

    Any ideas??

    Thanks!!

    Ron

    Posted 16 years ago #
  2. rscott7706
    Member

    Just want to kick this up to see if anyone has an answer on it.

    Thanks!

    Ron

    Posted 16 years ago #
  3. yuniar

    Ron, sorry for delay!

    So, basically machform uses relational tables to optimize your database storage.
    For dropdowns, only their index number is being stored to your "ap_form_xxx" table.

    You need to lookup the value of those index numbers to other table, which is "ap_element_options" table.

    Can you let me know exactly what you are trying to do? What do you need with those month and year?

    Do you need to rename your file with those month and year?


    MachForm Founder

    Posted 16 years ago #
  4. redityo

    Hi,

    I think you want to get actual data form drop down list instead of drop down id.
    Try to use this sql, you should get actual data (not id) from your drop down element :

    select
          B.option as month_element,
          C.option as year_element
      from
          (ap_form_2 as A
           left join ap_element_options as B
                  on A.element_2=B.option_id and B.element_id=2 and B.form_id = 2)
           left join ap_element_options as C
                  on A.element_3=C.option_id and C.element_id=3 and C.form_id=2

    here is from another link

    http://www.appnitro.com/forums/topic/mysql-question?replies=5

    http://www.appnitro.com/forums/topic/drop-downs-and-mysql?replies=11


    MachForm Support

    Posted 16 years ago #

RSS feed for this topic

Reply