Ver Mensaje Individual
  #8 (permalink)  
Antiguo 30/06/2010, 09:27
Avatar de martin0341
martin0341
 
Fecha de Ingreso: septiembre-2006
Ubicación: Rosario - Santa Fe
Mensajes: 296
Antigüedad: 17 años, 7 meses
Puntos: 8
Respuesta: Separar Resultados de una Consulta

falto incrementar la variable $i , sino los valores se pisan.
Código PHP:
Ver original
  1. $campo1[] = array();
  2. $campo2[] = array();
  3. $campo3[] = array();
  4. //asi hasta que tengas los campos que ocupes :P
  5.  
  6. $query = "SELECT * FROM vtiger_products
  7. INNER JOIN vtiger_productcf ON vtiger_products.productid=vtiger_productcf.product id
  8. WHERE vtiger_productcf.cf_601=0 AND vtiger_products.productcategory='Asistencia'";
  9. $resultado = mysql_query($query, $conexion) or die (mysql_error());
  10. $total = mysql_num_rows($resultado)
  11. $i=0;
  12. $while($row=mysql_fetch_array($total)){
  13.   $campo1[$i] = $row['productname'];
  14.   $campo2[$i] = $row['elSiguienteCampo'];
  15.   $campo3[$i] = $row['yAsiTeVas'];
  16.  $i++;
  17. }