Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/11/2005, 14:37
Avatar de helthon
helthon
 
Fecha de Ingreso: junio-2005
Ubicación: Lima
Mensajes: 549
Antigüedad: 18 años, 10 meses
Puntos: 7
Pregunta Campos vacios en mi B.D.

Señores Buenas

Estoy trantado de hacer lo siguiente :
Que me muestre todo un contenido siempre y cuando haya un registro en mi base de datos caso contrario que salga algun mensaje, yo tengo lo siguiente pero no se si estara bien structurado

Código PHP:
<? 
$sql 
"Select * from servicios  where idservicio = '' ";
$datos ''//como debo de hacer k esta variable capte algun registro de mi tabla
?>

<?php if ($datos != '') { ?>
<table width="450" border="1">
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><img src="../imagenes/mensajes/br.gif" width="21" height="20"><img src="../imagenes/admin/login.gif" width="64" height="16"></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
 </table>
      <?php 

} else {
// esto se debe de mostar en caso k no tenga ningun registro en mi B.D.
?>
<table width="450" border="1">
  <tr>
    <td>No hay datos disponibles por el momento </td>
  </tr>
</table>
<?
}
?>
__________________
HELTHON FUENTES
FLORERIA FLORES PERU Floresperu.com.pe
Garantizamos que cada entrega de flores será de la más alta calidad y frescura