strSQL = "Select Count(*) As Antal From Tabel1" strSQL1 = "Select Count(*) As Antal1 From Tabel2" strSQL2 = "Select Count(*) As Antal2 From Tabel3" Set RS = Conn.Execute(SQLStr) Set RS1 = Conn.Execute(SQLStr1) Set RS2 = conn.Execute(SQLStr2)
If Not RSDatabase.EOF Then tabel1 = RS("Antal") tabel2 = RS("Antal1") tabel3 = RS("Antal2") ialt = tabel1+tabel2+tabel3 ... <% =ialt %>
strSQL = "Select Count(*) As Antal From Tabel1" strSQL1 = "Select Count(*) As Antal1 From Tabel2" strSQL2 = "Select Count(*) As Antal2 From Tabel3" Set RS = Conn.Execute(strSQL) Set RS1 = Conn.Execute(strSQL1) Set RS2 = conn.Execute(strSQL2)
If Not RSDatabase.EOF Then tabel1 = RS("Antal") tabel2 = RS("Antal1") tabel3 = RS("Antal2") ialt = tabel1+tabel2+tabel3 ... <% =ialt %>
Conn.Close Set Conn = Nothing Set rs = Nothing End Sub %>
<% Private Function Kat_Count(strFrom, objConn, objrs) strSQL = "SELECT COUNT(*) AS Antal FROM " & strFrom Set objrs = objConn.Execute(strSQL) Kat_Count = objrs("Antal") End Function %>
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.