No announcement yet.

MYSQL inserting real values

  • Filter
  • Time
  • Show
Clear All
new posts

  • MYSQL inserting real values


    This must be easier than I think.

    I have a form that has a bunch of fields that do select statements to retrieve there data...Example customers field pulls in the customers into a drop down to select from.

    This all works good but I would like to save the true values of the selects into the database table instead of the linked id's that its currently saving. Example: (Linked value:100). 100 is actually "Walmart" and I want the value "Walmart" saved in the database not "100".

    I don't want the linking values to change the master table after the fact if say a customer detail is changed. I want that committed record to stay frozen without any changes.

    How can I do this?

    Thanks for any help.

  • #2
    For that you must create a field type varchar o text and to this field set it type automatic select with your statement sql select my-description, my_description from mytable ......
    so SC saves your description in a field type varchar.


    • #3
      Hi Alvagar...... Not sure if I follow?
      I have a field in my database table called "technician" and it is varchar. The field technician in SC is set to select and I have my select statement that pulls in all the technician names which works good. However, SC saves the technician name by its ID # in this case "3" instead of the technicians name. Can you explain in finer detail what you mean?


      • #4
        You is setting yor select with ID of customer. You Must set it with the name: example SELECT CUSTOMER_NAME, CUSTOMER_NAME FROM your table. (both with the customer_name).