Jeg er gået fra en access database til en mysql database! jeg har brugt mysql front til at importere mine data hvilket virker rigtig godt!
Problemet er dog bare at alle queries bliver lavet om til tabeller hvilket slet slet ikke duer! hvorledes importerer man queries let fra access til mysql???
Hvorledes flytter jeg så f.eks. denne sql sætning! jeg har prøvet at smide den ind i PHPmyadmin med den vil ikke tage den?????
SELECT DISTINCTROW countlog.Browser, Count(*) AS nrofcount, [Nrofcount]/((Select count(*) from [countlog])/100) AS pct FROM countlog GROUP BY countlog.Browser;
Hej arne! jeg har fundet et program som hedder "DB SQL assist" hvor den laver ovenstående kode om til: -------------------------------------- Function Dim sSQL As String sSQL = '"' sSQL = sSQL &" SELECT DISTINCTROW countlog.browser sSQL = sSQL &" Count(*) AS nrofcount," sSQL = sSQL &" [nrofcount]/((Select count(*) from [countlog])/100 AS pct" sSQL = sSQL &" FROM countlog" sSQL = sSQL &" GROUP BY countlog.Browser;" End Function
Med (hvis den kan bruges) sætter man den således ind? min nuværnde fra access forespørgslen ser således ud!!!
***** hvis du skal have nogle flere points må du lige sige til, jeg vil utrolig gerne have dette til at virke :O
------------------------ <% Dim browsers Dim browsers_numRows
Set browsers = Server.CreateObject("ADODB.Recordset") browsers.ActiveConnection = MM_counter_STRING browsers.Source = "SELECT * FROM browsersf ORDER BY nrofcount DESC" browsers.CursorType = 0 browsers.CursorLocation = 2 browsers.LockType = 1 browsers.Open()
Nej det virker ikke! hvis jeg tilsætter nogle points! kan du så evt omskrive de to nedenstående access sql´er til sql´er som virker i mysql?? jeg er helt blank da jeg ikke ved hvor jeg skal starte!
1.................
SELECT countlog.IP, countlog.Referent, countlog.Browser, countlog.Sprog, countlog.Host, countlog.Tid, countlog.Dato, First(DateDiff("d",[dato],Date())) AS nrdays, Format$(countlog.Dato,'ww yyyy') AS Week, Format$(countlog.Dato,'yyyy') AS [Year], Format$(countlog.Dato,'mmmm yyyy') AS [Month], Format$(countlog.Dato,'Long Date') AS Days, Format$(countlog.Dato,'"Kvt"q yyyy') AS kvar FROM countlog GROUP BY countlog.IP, countlog.Referent, countlog.Browser, countlog.Sprog, countlog.Host, countlog.Tid, countlog.Dato, Format$(countlog.Dato,'ww yyyy'), Format$(countlog.Dato,'yyyy'), Format$(countlog.Dato,'mmmm yyyy'), Format$(countlog.Dato,'Long Date'), Format$(countlog.Dato,'"Kvt"q yyyy');
2............. SELECT DISTINCTROW countlog.Browser, Count(*) AS nrofcount, [Nrofcount]/((Select count(*) from [countlog])/100) AS pct FROM countlog GROUP BY countlog.Browser;
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.