RE: [PHP-ES] Mostrar imagen cuando exista algo

From: Date: Thu, 15 Jul 2004 21:06:22 +0000
Subject: RE: [PHP-ES] Mostrar imagen cuando exista algo
Groups: php.general.es 
Request: Send a blank email to general-es+get-50253@lists.php.net to get a copy of this message
Este es el error que arroja: Notice: Use of undefined constant link2 - assumed 'link2' in D:\Intranet HP\tipificacionllamada\feseguimiento\smbtelesales\fe_smbtelesalesprincipal.p hp on line 502 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in D:\Intranet HP\tipificacionllamada\feseguimiento\smbtelesales\fe_smbtelesalesprincipal.p hp on line 502 Y este es mi código completo: <?php function Conectarse2() { if (!($link2=mysql_connect("localhost","***","***"))) { echo "Error conectando a la base de datos."; exit(); } if (!mysql_select_db("base_datos",$link2)) { echo "Error seleccionando la base de datos."; exit(); } return $link2; } $link2=Conectarse2(); $checa_buzon=mysql_query("select * from fmonitoreoretroalimentacion where acd='$registroacd' AND fechaactual='$muestrafechadiaactual' ", link2 ) ; if ($checa_buzon=!'') { (" <p><img src=\"file:///D:/Intranet%20HP/gif/buzon_apagado.gif\" alt=\"\" height=\"30\" width=\"33\" border=\"0\"></p> "); } else { (" <img src=\"file:///D:/Intranet%20HP/gif/buzon_prendido.gif\" alt=\"\" height=\"30\" width=\"33\" border=\"0\"> "); } ?> -----Mensaje original----- De: Juan Francisco Giordana [mailto:python@nks.com.ar] Enviado el: Thursday, July 15, 2004 4:05 PM Para: Pedro Matabuena CC: php-es@lists.php.net Asunto: Re: [PHP-ES] Mostrar imagen cuando exista algo Pedro Matabuena wrote: > Hola alguien sabe donde esta mi error?, creo que es de sintaxis, lo que > quiero hacer es que cuando no exista nada en el día en un campo me arroje > una imagen y cuando si muestre la otra, gracias > > $checa_buzon=mysql_query("select * from fmonitoreoretroalimentacion > where acd='$registroacd' AND fechaactual='$muestrafechadiaactual' ", > link ) > ; $link !!! > > > if ($checa_buzon=!'') > { > > > <img src=\"file:///D:/Intranet%20HP/gif/buzon_apagado.gif\" > alt=\"\" height=\"30\" width=\"33\" border=\"0\"> > > } > else > { > <img src=\"file:///D:/Intranet%20HP/gif/buzon_prendido.gif\" > alt=\"\" height=\"30\" width=\"33\" border=\"0\"> > } > Bye. -- Juan Francisco Giordana email: python@nks.com.ar www: http://python.nks.com.ar ICQ/UIN.: 162252809 Linux registered user Nº 294733

« previous php.general.es (#50253) next »