Ok, That's logical, but the thing is that even $x and $n are empty, as
if the result would give a hole bunch of zeros (but it isn't).

Could there be an error in the query or somewhere around that we are all
missing?

Thanks,

Cesar

> function cart_cdqty()
> {
> 
>     $query = "SELECT SUM(sess_itemsize) AS total_size
>               FROM sessions
>               WHERE sess_id = ".$_COOKIE['SID']."";
> 
>     $result = mysql_query($query);
> 
>     if(!$row = mysql_fetch_array($result))
>     {
>        return false;
>     } else {
>        $n = $row['total_size'];
>        $x = ceil( $n / 690.0 );
> 
>        $cart_cdqty = array(
>            'quantity' => $x,
>            'total_size' => $n
>        );
> 
>        return $cart_cdqty;
>     }
> 
> }



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to