Visualizzazione dei risultati da 1 a 5 su 5
  1. #1
    Utente di HTML.it L'avatar di agenti
    Registrato dal
    Feb 2002
    Messaggi
    2,427

    importare view mysql:errore

    codice:
    CREATE ALGORITHM = UNDEFINED DEFINER = `root` @ `localhost` SQL SECURITY DEFINER VIEW `conta` AS (
    
    SELECT `richieste`.`idutente` AS `idutente` , count( `mia_tab`.`id_rq` ) AS `tot_rq` 
    FROM `mia_tab` 
    GROUP BY `richieste`.`idutente` 
    )
    sto importando un db mysql dentro phpmyadmin.

    Ho un errore durante la creazione di una View:

    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 'ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `conta' at line 1

  2. #2
    Utente di HTML.it L'avatar di luca200
    Registrato dal
    Apr 2002
    Messaggi
    4,120
    un db non si importa "dentro phpmyadmin", ma in un altro db.
    Che versione usi di MySql? Quelle precedenti alla 5 non supportano le view.

  3. #3
    Utente di HTML.it L'avatar di agenti
    Registrato dal
    Feb 2002
    Messaggi
    2,427
    è la 4.1

    in effetti non supporta le view, ma mi chiedo se almeno supporta le subquery.

  4. #4
    Utente di HTML.it L'avatar di luca200
    Registrato dal
    Apr 2002
    Messaggi
    4,120
    Le subquery sì, esistono proprio dalla 4.1

  5. #5
    Utente di HTML.it L'avatar di agenti
    Registrato dal
    Feb 2002
    Messaggi
    2,427
    miracolo fu....

    grazie.

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 © 2025 vBulletin Solutions, Inc. All rights reserved.