Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

passing values from 2 tables

New Here ,
Oct 05, 2009 Oct 05, 2009

Hello

this code

                         <p>Available Subject for this semester:
                              <select name="listsubject">
                                  <option value="other" selected>Select one</option>
                                  <cfloop query="qGetUsrDistrict">
                                    <option value="#qGetUsrDistrict.Subject_Name#">#qGetUsrDistrict.Subject_Name#</option>
                                    </cfloop>
                              </select>

was from

<cfquery name="qGetUsrDistrict" datasource="#Variables.fw.Config.DSN#">
    SELECT * FROM subject
</cfquery>

and i want to insert it into another cfm page, called register.cfm..

        <cfquery name="qUpdateSubject" datasource="#Variables.fw.Config.DSN#">
            INSERT INTO Data
            (Subject_Code, Subject_Name, Student_Name, Semester, RegistrationDate)
            VALUES ('a',
                    'z',


                   '#listsubject#',


                    '#Variables.fw.User.Sem#',
                    '#DateFormat(Now())#')
        </cfquery>

my objective is to insert the data from 2 tables... '#Variables.fw.User.Sem#' works fine but how do we called the another variable #listsubject#' ???

plz help, thanks


367
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 05, 2009 Oct 05, 2009
LATEST

really easy actually but i have no idea what happen to my machine ...i already tried that but not working

just add #form.listsubject# ..

thanks anyway

-Naz

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources