Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/06/2015, 12:09
cesarcb95
 
Fecha de Ingreso: junio-2015
Mensajes: 26
Antigüedad: 8 años, 11 meses
Puntos: 0
error al consulta ala base de datos AYUDAA

HOLA A TODOS TENGO UN PROBLEMA AMI NO ME GUSTA TRABAJAR EN LOCALHOST PUES POR MUCHAS RAZONES
POR QUE CUANDO HAGO UNA CONSULTA ALA BASE DE DATOS PARA QUE ME MUESTRE LO QUE HAY EN LA TABLA ME SALE LO SIGUIENTE PUES ME E GUIADO CON LOS MANUALES PERO NO CE QUE ESTOY ASIENDO MAL POR FAVOR COLABORENME SI PUEDEN YA QUE NO E PODIDO ENTENDER CUAL ES MI ERROR EL CODIGO ES EL SIGUIENTE O PRIMERO EL ERROR QUE ME DA
Cita:
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'u392044762'@'10.2.1.3' (using password: NO) in /home/u392044762/public_html/php-mysql-select/php-mysql-select/funciones.php on line 11

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/u392044762/public_html/php-mysql-select/php-mysql-select/funciones.php on line 11

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/u392044762/public_html/php-mysql-select/php-mysql-select/select-demo3.php on line 9

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/u392044762/public_html/php-mysql-select/php-mysql-select/select-demo3.php on line 10

Y LAS LINEAS ALA QUE SE REFIERE SON LAS SIGUIENTES

Código PHP:
<?php
require("conexion.php");
require(
"funciones.php");

$criterio getParam($_GET["criterio"], "");
$total 0;
if (
$criterio != "") {
    
$query "SELECT * FROM categorias WHERE categorias ".sqlValue($criterio."%""text")." ORDER BY nombre ASC";
    
$queEmp mysql_query($query$conexion);
    
$total mysql_num_rows($queEmp);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>PHP con MySQL: Consultar datos en MySQL</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h3>Buscador de  Empresas</h3>
<form id="frbuscar" name="frbuscar" method="get" action="">
    <input name="criterio" type="text" id="criterio" size="25" value="<?php echo $criterio?>" /> &nbsp; 
    <input type="submit" id="btbuscar" value="Buscar" />
</form>
<?php if ($total 0) { ?>
<p><em>Total de Resultados: <?php echo $total?></em></p>
<table width="600" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <th>Nombre</th>
    <th>Dirección</th>
    <th>Teléfono</th>
  </tr>
  <?php while ($rsEmp mysql_fetch_assoc($queEmp)) { ?>
  <tr>
    <td><?php echo $rsEmp['nombre']; ?></td>
    <td><?php echo $rsEmp['direccion']; ?></td>
    <td><?php echo $rsEmp['telefono']; ?></td>
  </tr>
  <?php ?>
</table>
<?php ?>
<p>&nbsp;</p>
</body>
</html>
POR FAVOR NO CE SI SEA QUE ESTOY MANEJANDO ETIQUETAS VIEJAS POR QUE SIEMPRE TRABAJO EN SERVIDOR DE HOSTING MUCHAS GRACIAS SI ME PUEDEN EXPLICAR EL PROBLEMA PARA APRENDER Y SOLUCIONAR ESTE INCONVENIENTE MUCHAS GRACIAS