title: save list order in database?
body: <p>I have a list with values from the db, and with jquery ui I can change the sorting order of the list witch is great! </p>
  
  <p>But now I wonder how I can save the changed order to the db? With a do until, but how?</p>
  
  <p>This is what I got so far.</p>
  
  <pre><code>sql = "SELECT * FROM links ORDER BY u.avd_id DESC;"
  set rs = conn.Execute (sql)
  
  
  if saveList="saveList" then
  
  userIdet = session("user_id")
  sql3="delete from links where userId="&amp; userIdet &amp;";"
  set rs3=conn.execute(sql3)
  
  response.write " $('li','#myList').each(function(i,li) { "
  
  
  sql= "INSERT INTO links SET headline='"&amp; headline &amp;"',datum='"&amp; datum &amp;"',links_adress='"&amp; links_adress &amp;"', userId=" &amp; userId &amp; " ;"
  conn.Execute (sql)
  
  
  response.write" })"
  
  response.redirect("links.asp")
  
  end if
  </code></pre>
  
  <p>I would really need some help, thanks! /Claes</p>