Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/01/2014, 06:31
tayran8
 
Fecha de Ingreso: enero-2014
Ubicación: USA
Mensajes: 50
Antigüedad: 10 años, 3 meses
Puntos: 0
problema con sistema de busqueda PHP y MYSQL

Buenos días!


Solia tener este sistema de busqueda en mi localhost y cuando lo mude a el servidor me dejo de funcionar. El error que muestra es el siguiente.

Fatal error: Call to a member function fetch_array() on a non-object in /home/centrote/public_html/busquedaprueba.php on line 162

Código PHP:
<?php


require "conexiondb.php";
if (isset(
$_POST['busca']))
{
$busca $_POST['busca'];
if (
$busca!=""){ 
$busqueda=$con->query("SELECT * FROM clientes C INNER JOIN producto P ON C.serial  = P.serial WHERE P.serial  like '%".$busca."%' or c.cedula like '%".$busca."%' " );

}

echo 
"<table border=1> 
<tr>
<th>Cliente</th>
<th>Cedula</th>
<th>Orden numero</th>
<th>Email</th>
<th>Barrio</th>
<th>Telefono</th>
<th>Producto</th>
<th>Marca</th>
<th>Almacen</th>
<th>Dano</th>
<th>Fecha de recepcion</th>
<th>Tecnico</th>
<th>Estado</th>
<th>Sede</th>
<th>Fecha de entrega</th>
<th>Editar</th>
</tr>"
;

$rowColors = Array('#A6A6FF','#FFFFFF'); $nRow 0;

while (
$muestra=$busqueda->fetch_array()){
echo 
'<tr style="background-color:'.$rowColors[$nRow++ % count($rowColors)].';">';
echo 
'<td>' .$muestra['cliente'].'</td>';
echo 
'<td>' .$muestra['cedula']. '</td>';
echo 
'<td>' .$muestra['serial']. '</td>';
echo 
'<td>' .$muestra['email']. '</td>';
echo 
'<td>' .$muestra['barrio'].'</td>';
echo 
'<td>' .$muestra['telefono']. '</td>';
echo 
'<td>' .$muestra['producto']. '</td>';
echo 
'<td>' .$muestra['marca']. '</td>';
echo 
'<td>' .$muestra['almacen']. '</td>';
echo 
'<td>' .$muestra['dano'].'</td>';
echo 
'<td>' .$muestra['fecharecepcion']. '</td>';
echo 
'<td>' .$muestra['tecnico']. '</td>';
echo 
'<td>' .$muestra['estado']. '</td>';
echo 
'<td>' .$muestra['sede']. '</td>';
echo 
'<td>' .$muestra['entregaacliente']. '</td>';

echo 
"</form>";

}
}
mysqli_close ($con)

?>
<script type="text/javascript">
swfobject.registerObject("FlashID");
swfobject.registerObject("FlashID2");
</script>
</body>
</html>

Agradezco sus aportes