3 Replies Latest reply on Oct 9, 2007 10:31 AM by CFMXPrGrmR

    Update Statement Help

    -Matthew-
      What the page looks like:

      quote:

      <select name="score_identifierscore2" id="score_identifierscore2">
      <option value="0" selected>0</option>
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
      </select>
      <input name="score_identifier2" type="hidden" id="score_identifier2" value="V2.1">

      <select name="score_identifierscore3" id="score_identifierscore3">
      <option value="0" selected>0</option>
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
      </select>
      <input name="score_identifier3" type="hidden" id="score_identifier3" value="V3.1">

      <input name="score_teacherid" type="hidden" id="score_teacherid" value="340">
      <input name="score_teachername" type="hidden" id="score_teachername" value="Tony Teacher">
      <input name="score_studentid" type="hidden" id="score_studentid" value="1">
      <input name="score_vid" type="hidden" id="score_vid" value="3">
      <input name="score_staid" type="hidden" id="score_staid" value="26">
      <input name="totalrows" type="hidden" id="totalrows" value="3">


      Insert Statement:

      quote:


      <cfoutput>

      <cfloop index="I" from="1" to="#form.totalrows#" step="1">

      <cfset score_identifierscore = "score_identifierscore" & I>
      <cfset score_identifier = "score_identifier" & I >

      <cfquery datasource="Some Source">
      INSERT INTO voc_scores
      (score_studentid, score_vid, score_staid, score_identifier, score_teacherid, score_studentname, score_identifierscore, score_teachername)

      VALUES('#FORM.score_studentid#','#FORM.score_vid#','#FORM.score_staid#','#form[score_ident ifier]#','#FORM.score_teacherid#','#FORM.score_studentname#', '#form[score_identifierscore]#', '#form.score_teachername#')
      </cfquery>

      </cfloop>
      </cfoutput>


      I need help with an update statement:

      I've tried several ways with no success, I would post the code, but I want a fresh outlook rather than the way I've been trying.

      Thanks,