The code that I ended up using was:

$res=mysql_query("select distinct dealercode from transactions where
dealercode!='' order by dealercode",$intranet);
$count=0;
while($row=mysql_fetch_array($res)) {
    $amt=mysql_query("select sum(amount) as total from transactions where
date between '2003-04-01' and '2003-06-31' and
dealercode='$row[dealercode]'",$intranet);
    $afftotal=mysql_fetch_array($amt);
    $transactions[$row[dealercode]]["onlineu"]=$afftotal[total];
    $amt=mysql_query("select usercountry,sum(amount) as total from
orders_placed where date between '2003-04-01' and '2003-06-31' and
dealercode='$row[dealercode]' and sent='y' group by usercountry",$intranet);
    while($cdtotal=mysql_fetch_array($amt)) {
        
$transactions[$row[dealercode]][$cdtotal[usercountry]]=$cdtotal[total];
    }
}



On 8/29/03 11:38 AM, "John W. Holmes" <[EMAIL PROTECTED]> wrote:

> Ford, Mike [LSS] wrote:
> 
>> Having said that, I've just given you a clue: since array_push($array, $var)
>> is equivalent to $array[] = $var, you can get the result you want by doing:
>> 
>>    $array[] = array($k, $v);
>> 
>> (with, of course, appropriate values for $array, $k and $v substituted to
>> suit your code!).
> 
> Shouldn't that be:
> 
> $array[$k] = $v;

--
Cheers

Mike Morton

****************************************************
*
* Tel: 905-465-1263
* Email: [EMAIL PROTECTED]
*
****************************************************

"Indeed, it would not be an exaggeration to describe the history of the
computer industry for the past decade as a massive effort to keep up with
Apple."
- Byte Magazine

Given infinite time, 100 monkeys could type out the complete works of
Shakespeare. Win 98 source code? Eight monkeys, five minutes.
-- NullGrey 

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

Reply via email to