Ver Mensaje Individual
  #10 (permalink)  
Antiguo 28/09/2006, 13:51
Avatar de Erikfrancisco
Erikfrancisco
 
Fecha de Ingreso: noviembre-2003
Ubicación: Estado de México
Mensajes: 503
Antigüedad: 21 años, 3 meses
Puntos: 4
BUENO DESPUES DE ESTAR TANTEANDO DEMASIADAS VECES DECIDI HACERME UN EJEMPLO Y ME DIO RESULTADOS CREO QUE EL ERROR ESTABA EN COMO LE PASABAMOS EL ARRAY A LA CONSULTA ADEMAS LA CONSULTA LA APLIQUE COMO TE LA SUGIRIO CLUSTER:

<?php
class algo
{
function vercompras( $id )
{
$id2 = implode ( ",", $id ); // esto sirve para pasarle los id a la consulta
$db = mysql_pconnect ( "xxx", "xxx", "xxx" );
mysql_select_db ( 'xxx' );
$consulta = "SELECT * FROM tblArticulos WHERE id_index IN ( $id2 )";
$result = mysql_query ( $consulta );
$numeroderesult = mysql_num_rows ( $result );

if ($numeroderesult > 0)
{
while ( $fila = mysql_fetch_array ( $result ) )
{
echo "ID de artículo: ".$fila['id_index']."<br/>";
echo "Precio de artículo: ".$fila['precio']."<br/>";
echo "Cantidad de cuotas: ".$fila['cuotas']."<p>";
}
}

else
{
echo "No hay resultados";
}
}
}

$id = array ( '1', '2', '3' ); // este es el array que seguramente generas

$b = new algo();
$b -> vercompras( $id );
?>

ESPERO AHORA SI QUEDE CLARO Y TE DE UNA IDEA PARA REALIZARLO YA QUE YO NO TENGO EL CODIGO COMPLETO QUE TU UTILIZAS. SUERTE