Visualizzazione dei risultati da 1 a 3 su 3

Discussione: Da access a Mysql

  1. #1

    Da access a Mysql

    Sto cercando di migrare da access a mysql uno script molto conosciuto, StatCounteX

    Ho un problema con la seguente instruzione sql:

    codice:
    "SELECT Format( GroupIpsByDate.Date, 'm') as Month, Count(GroupIpsByDate.IP) AS Total FROM GroupIpsByDate GROUP BY Format( GroupIpsByDate.Date, 'm') order by Count(GroupIpsByDate.IP) desc"
    L'errore che mi viene restituito è il seguente:

    Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
    [MySQL][ODBC 3.51 Driver][mysqld-5.0.51a-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''m') as Month, Count(GroupIpsByDate.IP) AS Total FROM GroupIpsByDate GROUP BY Fo' at line 1.

    Se sostituisco 'm' con %m il risultato non cambia.

    Come posso risolvere ?

    Grazie in anticipo

  2. #2
    In MySQL esiste la funzione MONTH() che restituisce il mese della data che gli viene passata come parametro. Poi provare ad utilizzare quella:

    http://dev.mysql.com/doc/refman/5.0/...function_month

  3. #3
    :master: , non ho capito bene, tu mi stai dicendo di sostituire 'm' com MONTH() ?

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.