Foros del Web » Programando para Internet » PHP »

no me hace la consulta

Estas en el tema de no me hace la consulta en el foro de PHP en Foros del Web. hola, tengo el siguiente script Código PHP: <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Documento sin t&iacute;tulo</title> </head> <body> <p><img src="img/logo_jardinplaza_jpg.jpg" width="250" height="115"></p> <p>    <? include( 'connect.php' ); $noticia = $_REQUEST [ 'ev' ]; ...
  #1 (permalink)  
Antiguo 14/02/2007, 13:15
Avatar de el_cesar  
Fecha de Ingreso: mayo-2001
Ubicación: Cali
Mensajes: 2.423
Antigüedad: 22 años, 10 meses
Puntos: 20
no me hace la consulta

hola, tengo el siguiente script

Código PHP:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>
<body>
<p><img src="img/logo_jardinplaza_jpg.jpg" width="250" height="115"></p>
<p>
  <?
include('connect.php');
$noticia=$_REQUEST['ev'];

$publicarmysql_query"SELECT * from eventos where titulo = '".$noticia."' ") or die (mysql_error());


$publicacion=mysql_query($publicar);
$filas=mysql_num_rows($publicacion);
    if(
$filas>0){

    while (
$row=mysql_fetch_array($publicacion))
    {
        {
        echo 
"<tr><td><b>".$row["titulo"]."</b></td></tr>";

        echo 
"<tr><td><div align='justify'><em>".$row["descripcion"]."</em></div></td></tr>";

        echo 
"<tr><td><div align='justify'>".$row["fecha_inicial"]."</div></td></tr>";

        echo 
"<tr><td><div align='justify'>".$row["fecha_final"]."</div></td></tr>";
        }
    }
    }
?>
</p>
</body>
</html>
pero resulta que no me arroja ningun resultado, por el contrario me dice Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\Archivos de programa\xampp\htdocs\jardinplaza\web\construccion \evento.php on line 17

donde mi linea 17 es

Código PHP:
$filas=mysql_num_rows($publicacion); 
no se q pasa porque hace como 2 horas funcionaba bien, pero le pusde una imagen (la que se ve alli) y ya no corre

que puede ser?
__________________
Say no more.......
  #2 (permalink)  
Antiguo 14/02/2007, 13:57
Avatar de carlosmbrizuela  
Fecha de Ingreso: enero-2007
Ubicación: La Plata (Argentina)
Mensajes: 490
Antigüedad: 17 años, 3 meses
Puntos: 1
Re: no me hace la consulta

Proba asi:
<?
include('connect.php');
$noticia=$_REQUEST['ev'];

?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>
<body>
<p><img src="img/logo_jardinplaza_jpg.jpg" width="250" height="115"></p>
<p>
<?

$publicar
= mysql_query( "SELECT * from eventos where titulo = $noticia ") or die (mysql_error());

Saludos
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 10:42.