elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Security Series.XSS. [Cross Site Scripting]


  Mostrar Mensajes
Páginas: [1]
1  Programación / PHP / Re: [Share] - Intranet Colegio (PHP,MYSQL) en: 25 Octubre 2013, 20:51 pm
Hola, estoy tratando de usar esta base de datos, ya importe las tablas de web.sql, sin embargo no puedo copiar los procedimientos del sistema, en dbintranet->sql me sale este error:
Error
consulta SQL: Documentación

CREATE FUNCTION calcula_valor_promovido(

id_proceso INT
) RETURNS INT BEGIN DECLARE numero INT DEFAULT 0;

SELECT COUNT( nt.promedio )
INTO numero
FROM nota nt
INNER JOIN horario hor ON nt.idhorario = hor.idhorario
INNER JOIN carga_curricula cc ON cc.idcarga = hor.idcarga
INNER JOIN curso cur ON cur.idcurso = cc.idcurso
WHERE nt.promedio <13
AND nt.idproceso = id_proceso
AND cur.vital =  '1';

IF numero >1 THEN SET numero =0;

ELSE SELECT COUNT( nt.promedio )
INTO numero
FROM nota nt
INNER JOIN horario hor ON nt.idhorario = hor.idhorario
WHERE nt.promedio <13
AND nt.idproceso = id_proceso;

IF numero >0 THEN IF numero <3 AND numero >0 THEN SET numero =2;

ELSE SET numero =0;

END IF ;

ELSE SET numero =1;

END IF ;

END IF ;

RETURN numero;

END //
MySQL ha dicho: Documentación

#1418 - This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

pd. tmb le puse el delimiter://

y cuando no pongo este sale:

#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 '// create procedure sp_lista_documento_ingreso(ndoc_ varchar(100),inicio tinyin' at line 1

ayudenme por favor :C
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines