asp/mySQL
Jeg har den her :Set rsindhold = Conn.execute("select tilbehorid from specialindhold where specialpizzaid = '" & vareid & "'")
first = True
Do until rsindhold.eof
Set rstilbehor = Conn.execute("select navn, pris1, pris2 from specialtilbehor where id = '" & rsindhold("tilbehorid") & "'")
If not rstilbehor.eof Then
If first = True Then
tmpbestil = tmpbestil & lcase(rstilbehor("navn"))
Else
tmpbestil = tmpbestil & ", " & lcase(rstilbehor("navn"))
End if
End if
Set rstilbehor = nothing
first = False
rsindhold.movenext
Loop
Set rsindhold = nothing
som jeg gerne vil sotere i og derfor har jeg lavet et felt i mySQL'en den ka sotere med (besteme rækkefølgen med)og har så sat den her (nedenstånde) ind i stedet for den ovenstående... men det virke ikke..
'first = True
'Set rsindhold = Conn.execute("select specialtilbehor.navn as navn, specialtilbehor.pris1 as pris1, specialtilbehor.pris2 as pris2 from specialtilbehor, specialindhold where specialtilbehor.id = specialindhold.tilbehorid AND specialindhold.specialpizzaid = '" & vareid & "' order by specialtilbehor.sotere")
'Do until rsindhold.eof
'If first = True Then
' tmpbestil = tmpbestil & lcase(rstilbehor("navn"))
'Else
' tmpbestil = tmpbestil & ", " & lcase(rstilbehor("navn"))
'End if
'first = False
'rsindhold.movenext
'Loop
'Set rsindhold = nothing
