Har en tabell där jag har 5 tabeller. Vote1, vote2, vote3, vote4 och vote5
I dessa sparar jag antalet röster. Vote1 motsvarar värdet 1 o.s.v
Vill nu i sql strängen hämta det högsta medelvärdet. Alltså:
Vote1 = rs("vote1")*1
Vote2 = rs("vote2")*2
Vote3 = rs("vote3")*3
Vote4 = rs("vote4")*4
Vote5 = rs("vote5")*5
Total = rs("vote1")+rs("vote2")+rs("vote3")+rs("vote4")+rs("vote5")
TotalVote = vote1 + vote2 + vote3 + vote4 + vote5
Medel = TotalVote/Total
fast i sql strängen. Tror jag skrev rätt... Vill även hämta bilden ifrån databasen som heter picture.