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 unmi restituisce questo errorecodice:call extLingue (3);
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 errorecodice: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
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

Rispondi quotando