Ver Mensaje Individual
  #7 (permalink)  
Antiguo 12/04/2009, 11:30
Avatar de b0zZy
b0zZy
 
Fecha de Ingreso: enero-2009
Ubicación: Francia
Mensajes: 28
Antigüedad: 15 años, 3 meses
Puntos: 0
Respuesta: Total de produtos en cada categoria !

Cita:
Iniciado por Ronruby Ver Mensaje
mysql_fecth_array($results)) no es una funcion -_- esta mal escrita:

mysql_fetch_array($results))

Una busqueda en el manual te hubiera dado la solucion.
Hola Ronruby,
Tienes razon, esta es la funcion
Código PHP:
function getCategoryList()
{
    
$sql "SELECT cat_id, cat_name, cat_image
            FROM tbl_category
            WHERE cat_parent_id = 0
            ORDER BY cat_name"
;
    
$result dbQuery($sql);
    
    
$cat = array();
    while (
$row dbFetchAssoc($result)) {
        
extract($row);
        
        if (
$cat_image) {
            
$cat_image WEB_ROOT 'images/category/' $cat_image;
        } else {
            
$cat_image WEB_ROOT 'images/no-image-small.png';
        }
        
        
$cat[] = array('url'   => $_SERVER['PHP_SELF'] . '?c=' $cat_id,
                       
'image' => $cat_image,
                       
'name'  => $cat_name);

    }
    
    return 
$cat;            

Pero no llego a adaptarlo !! Me tiene harto. Me puedes ayudar, porfavor !
Gracias a ambos, Ronruby y pacmanaman.