Announcement

Collapse
No announcement yet.

Values in a double select

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • gsanchez
    started a topic Values in a double select

    Values in a double select

    Hello:

    How I can get the values ​​resulting from a double select?

    I have an apllication control

    Regards

  • nsch2308
    replied
    maybe can you making that whith this
    http://www.scriptcase.net/docs/es_es...many-relation/

    Leave a comment:


  • centoj
    replied
    you can help me too I have a similar problem:
    I would like to memorize in the table the selections of a "double select" in my case I have two tables which are as follows:

    "CartellaPaziente" with the following fields:
    -------------------------------------------------- ------------ IdAccettazioneVisita int(11) Auto incremento
    DataAccettazioneVisita date
    CCIdPaziente int(11)
    MotivoVisita varchar(35)
    Ortottista varchar(35)
    Medico varchar(35)
    Accettazione char(2)
    IdPatologiaF int(11)
    Note_PatologiaF longtext
    -------------------------------------------------- ------------
    "tabpatanamnesif" with the following fields:
    -------------------------------------------------- ------------ IdPatologiaF int(11) Auto incremento
    PatologiaF varchar(25)
    -------------------------------------------------- ------------

    I would like to select multiple entries from the "tabpatanamnesif" table and store them in the "Patient Folder" table, as in the example I enclose. Thank you in advance for the help you will be able to give me. double_select.jpg

    Leave a comment:


  • apolo512
    replied
    Originally posted by aducom View Post
    The data will be stored like 'myoption1|myption2|myoption3' if you have three items selected. So all selected elements will be stored with a separator. You can extract that from the database and use the php explode statement to form an array with individual values and process them.
    You're right, is working.

    The example is:
    $result = explode('";"', str_replace(";",",",{CUPONES}));
    $mystring = implode('","', $result);

    $array = explode(',',$mystring);
    $count = count($array); // array size
    I don't exactly how this work but after many test is done.

    Leave a comment:


  • aducom
    replied
    The data will be stored like 'myoption1|myption2|myoption3' if you have three items selected. So all selected elements will be stored with a separator. You can extract that from the database and use the php explode statement to form an array with individual values and process them.

    Leave a comment:


  • apolo512
    replied
    Originally posted by aducom View Post
    Your selects are stored in one string separated by a pipe character. So your {field} will contain the selected values.
    Do you have and example to call de values?

    Leave a comment:


  • apolo512
    replied
    Somebody has another example?, I need storage in my db the double select field selected items. Also know how many items are selected. Thanks in advance.

    Leave a comment:


  • kakibox
    replied
    Hi Bernhard,

    The link is broken.
    Do you have the revised link ?

    Thank's

    Originally posted by bartho View Post
    Hello,

    Please take a look at the example and tutorial below:

    example: http://scriptcase.net/phpgenerator/s...-a-link-table/
    tutorial: http://scriptcase.net/phpgenerator/s...orm/form24.php

    regards,
    Bernhard Bernsmann

    Leave a comment:


  • gsanchez
    replied
    Albert:

    Excellent!!

    Thank you very much!

    Leave a comment:


  • aducom
    replied
    Your selects are stored in one string separated by a pipe character. So your {field} will contain the selected values.

    Leave a comment:


  • gsanchez
    replied
    Hi Bernhard, thanks for you answer

    but, how I know, inside my program, if I selected Vermont and not Maine.

    How I can get the right side of the select; if I selected Vermont and Connecticut how to get $CitiesSelected = ('Vermont','Connecticut'); which is the var name where the double select store the items selected

    Thank you :-)

    Leave a comment:


  • bartho
    replied
    Hello,

    Please take a look at the example and tutorial below:

    example: http://scriptcase.net/phpgenerator/s...-a-link-table/
    tutorial: http://scriptcase.net/phpgenerator/s...orm/form24.php

    regards,
    Bernhard Bernsmann

    Leave a comment:

Working...
X