
AYUDA CON ERROR! MYSQL_FETCH_ARRAY
Publicado por Frank (3 intervenciones) el 12/02/2014 08:13:24
ayudaaaa!! me sale este error: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\TIPOFB\search.php on line 8
mi codigo es:
mi codigo es:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
include('clase_conexion.php');
if($_POST)
{
$q=$_POST['palabra'];//se recibe la cadena que queremos buscar
$sql_res=mysql_query("select * from face where nombre like '%$q%'",$c);
while($row=mysql_fetch_array($sql_res))
{
$id=$row['id'];
$nombre=$row['nombre'];
$direc=$row['direccion'];
$foto=$row['url'];
?>
<a href="usuario_completo.php?id=<?php echo $id; ?>" style="text-decoration:none;" >
<div class="display_box" align="left">
<div style="float:left; margin-right:6px;"><img src="<?php echo $foto?>" width="60" height="60" /></div>
<div style="margin-right:6px;"><b><?php echo $nombre; ?></b></div>
<div style="margin-right:6px; font-size:14px;" class="desc"><?php echo $direc; ?></div></div>
</a>
<?php
}
}
else
{
}
?>
- fb.rar(90,2 KB)
Valora esta pregunta


0