Ver Mensaje Individual
  #5 (permalink)  
Antiguo 05/03/2012, 22:28
Avatar de chwc
chwc
 
Fecha de Ingreso: julio-2008
Ubicación: Buenos Aires ! :D
Mensajes: 814
Antigüedad: 15 años, 9 meses
Puntos: 103
Respuesta: Como seleccionar datos multiplo de 3 en una sentencia

por que no pruebas mediante php + css
Código PHP:
Ver original
  1. $i = 0;
  2.  while ($Qproducts->next()) {
  3.      if(($i % 3 == 0) && ($i != 0))
  4.         $this->_content .= '<div style="clear:both"></div>';
  5.        
  6.      $osC_Product = new osC_Product($Qproducts->valueInt('products_id'));
  7.  
  8. $this->_content .= '<div class="whats_new_cont '.$style.' estilocolor'.($i % 3).'"></div>';
  9.     $i++;
  10.            
  11.         }

css
Código CSS:
Ver original
  1. .estilocolor0{
  2. background-color:red;
  3. }
  4. .estilocolor1{
  5. background-color:green;
  6. }
  7. .estilocolor2{
  8. background-color:blue;
  9. }
saludos