Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/09/2012, 09:27
ninco90
 
Fecha de Ingreso: enero-2011
Mensajes: 77
Antigüedad: 13 años, 3 meses
Puntos: 3
Texto si no hay resultados en Base de Datos

Hola Buenas Me gustaría saber como puedo hacer para mostrar un texto diciendo que "Este Usuario no ha Publicado ningun Vídeo Todavía" en vez de aparecer la tabla, este es el código:

Código PHP:
     <?php
$query2 
"SELECT * FROM empresa WHERE `usuario` = '$username' ORDER BY id desc";
$queEmp2 mysql_query($query2$conexion);
?>
<table width="95%" class="table table-striped" border="0" align="left" cellpadding="0" cellspacing="0">
  <thead> <tr>
    <td width="15%"></td>
     <td width="28%"><h2>Nombre</h2></td>
    <td width="40%"><h2>Descripción</h2></td>
    <td width="28%"><h2>Categoría</h2></td>
  </tr> </thead>
  <tbody><?php while ($rsEmp mysql_fetch_assoc($queEmp2)) { ?>
  <tr>
    <td><img src="https://i4.ytimg.com/vi/<?php echo $rsEmp['contenido']; ?>/mqdefault.jpg" width="120px" height="70px" alt="Carrátula"></td>
    <td><strong><a href="ver.php?id=<?php echo $rsEmp['id']; ?>"><?php echo $rsEmp['nombre']; ?></a></strong><br> Por: <?php echo $rsEmp['usuario']; ?></td>
    <td><?php echo $rsEmp['descripcion']; ?></td>
    <td><span class="label label-success"><?php echo $rsEmp['tipo']; ?></span></td>
  </tr>
  <?php ?></tbody>
</table>
Creo que tendré que utilizar if, else y echo, no?