ciao,
rieccomi qui a litigare con una SP..

questo il codice della SP:

codice:
DELIMITER $$

CREATE DEFINER=`root`@`localhost` PROCEDURE `extLingue`(lingua int)
BEGIN

    declare str varchar(10000) default "select * from vlingue";

    IF lingua > 0 THEN 
        set str = concat(str," WHERE idlingue = ",lingua);
    END IF;

    prepare stmt from @str;
    execute stmt;
    deallocate prepare stmt;
        
END

se faccio un
codice:
call extLingue (3);
mi restituisce questo errore

codice:
Error Code: 1064  
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 'NULL' at line 1
sapete darmi qualche dritta sul motivo di questo errore? non riesco a capire se derivi dal CALL o dalla SP. se eseguo le query possibili per la SP ottengo dei resultset validi, mentre in SP mi restiuisce un errore

grazie

EDIT

queto è l'output della view vlingue

codice:
Query Output:
> select * from vlingue

+ ------------- + ---------------- + ---------- + ------------ + -------------- + -------------- + -------------- +
| idlingue      | idbk_utenti      | alfa3      | default      | testo_ITA      | testo_ENG      | testo_FRA      |
+ ------------- + ---------------- + ---------- + ------------ + -------------- + -------------- + -------------- +
| 1             | 1                | ITA        | on           | Italiano       | Italian        | Italian        |
| 2             | 1                | ENG        | off          | Inglese        | English        | Englais        |
| 3             | 1                | FRA        | off          | Francese       | French         | France         |
+ ------------- + ---------------- + ---------- + ------------ + -------------- + -------------- + -------------- +
3 rows