Ver Mensaje Individual
  #6 (permalink)  
Antiguo 23/04/2011, 16:19
marcofbb
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Me ayudan con este error de PHP

Código PHP:
Ver original
  1. $conecta = mysql_connect("localhost", "root", "");
  2. mysql_select_db("ehms", $conecta);
  3. $sql= mysql_query("SELECT * from clientes where Cue like '%$cue%' and Nom like '%$nom%' and Dir like '%$dir%' and Tel like '%$tel%'", $conecta);
  4.  
  5. echo "<table border = '1' align= 'center'>";
  6. echo "<tr>";
  7. echo "<td> Cuenta </td>";
  8. echo "<td> Nombre </td>";
  9. echo "<td> Direccion </td>";
  10. echo "<td> Telefono </td>";
  11. echo "</tr>";  
  12. while ($row = mysql_fetch_row($sql))
  13. {
  14. echo "<tr>";
  15. echo "<td>$row[0]</td>";
  16. echo "<td>$row[1]</td>";
  17. echo "<td>$row[2]</td>";
  18. echo "<td>$row[3]</td>";
  19. echo "</tr>";
  20. }
  21. echo "</table>";
  22. mysql_close($conecta);

Hay resultado en la base de datos ?

Intenta cambiar

$sql= mysql_query("SELECT * from clientes where Cue like '%$cue%' and Nom like '%$nom%' and Dir like '%$dir%' and Tel like '%$tel%'", $conecta);

por

$sql= mysql_query("SELECT * from clientes where Cue like '%$cue%' OR Nom like '%$nom%' OR Dir like '%$dir%' OR Tel like '%$tel%'", $conecta);