🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #1425

Re: Script en PHP

#1425
From: Nitron
Date: Mon, 14 Aug 2006 16:51
48 lines
2435 bytes
Hola,

�Haz probado hacer un echo de la instruccion, imprimirla en cualquier parte 
de la pagina y despues pegarla en phpmyadmin?. En una de esas MySql te 
indica donde esta el error, o quizas la consulta efectivamente devuelve 
vacio?

Quizas inventarte un registro que efectivamente cumpla la condicion AND que 
estas poniendo.

Salu2.
Nitron.

"T_Q_LEO" <programNOSPAM@inspectorate.cl> escribi� en el mensaje 
news:44e09fc4$1_1@nova.entelchile.net...
> Saludos:
>
> En mi script de PHP poseia la siguiente instruccion para consultar datos 
> de
> una base MYSQL:
>
> "select * from lider where MONTH(FROM_UNIXTIME(fecha))='$mescons' and
> YEAR(FROM_UNIXTIME(fecha))='$anocons' order by fecha DESC LIMIT
> ".$st.",".$pp;
>
> Dicha instrucci�n funcionaba sin problemas, pero luego me di cuenta de que
> debia realizar un filtrado m�s y agregue el siguiente parametro
> cliente='$empresa' quedando la instruccion como sigue:
>
> select * from lider where cliente='$empresa' and
> MONTH(FROM_UNIXTIME(fecha))='$mescons' and
> YEAR(FROM_UNIXTIME(fecha))='$anocons' order by fecha DESC LIMIT
> ".$st.",".$pp;
>
> Por una extra�a raz�n dicha consulta no me arroja ningun resultado, he
> intentado colocar el parametro de cliente en otras partes de la 
> instruccion
> pero aun asi no me da resultados.
>
> Espero puedan orientarme a encontrar una solucion a mi problema.
>
> Agradeciendo de antemano se despide atentamente,
>
> -- 
> Ricardo Carcass�n
> Santiago - Chile
>
> 
Technical Details
Message-ID: <ebq9m7$hs3$1@news.nivel5.cl>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!nntp-server.pubsub.com!news.nivel5.cl!not-for-mail
References: <44e09fc4$1_1@nova.entelchile.net>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,68886b01d65beeee
X-Google-Attributes: gid1593cb,public
X-Google-Language: SPANISH,ASCII
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!nntp-server.pubsub.com!news.nivel5.cl!not-for-mail
From: "Nitron" <roarriagadaNOSPAM@vtr.net>
Newsgroups: chile.comp.programacion
Subject: Re: Script en PHP
Date: Mon, 14 Aug 2006 12:51:59 -0400
Organization: Varios
Lines: 50
Message-ID: <ebq9m7$hs3$1@news.nivel5.cl>
References: <44e09fc4$1_1@nova.entelchile.net>
NNTP-Posting-Host: 190.44.222.5
X-Trace: news.nivel5.cl 1155574279 18307 190.44.222.5 (14 Aug 2006 16:51:19 GMT)
X-Complaints-To: news@news.nivel5.cl
NNTP-Posting-Date: Mon, 14 Aug 2006 16:51:19 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
X-RFC2646: Format=Flowed; Original