MySQL Forums
Forum List  »  Spanish

mysqli_multi_query
Posted by: Diego Scocco
Date: January 03, 2014 05:25PM

Estoy usando mysqli_multi_query y me da todos los valores 0

set @haber=20;
SELECT calculo FROM (SELECT if(importe>@haber,faltante+(importe-(importe-@haber))+(@haber:=0), @haber-(@haber:=@haber-(importe-faltante))) as calculo FORM ctacte WHERE codigo cliente=10 and codigo operacion=1) as calfal

Si lo hago en phpmyadmin me funciona y me da correcto los valores.

El error puede estar en la variable @haber que no me toma el valor.

Saludos

Options: ReplyQuote


Subject
Views
Written By
Posted
mysqli_multi_query
1177
January 03, 2014 05:25PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.