将数据从SQL查询返回到数组中

I have the following code:

$aResult = $db->exec_sql($sql);

    //dlog2("matt", __line__, $aResult);
        print_r($aResult);


        $params = array(
                        'store_id' => $aResult['iStoreID'],
                        'user_id' => $aResult['iUserID'],
                        'store_name' => $aResult['cStoreName'],
                        'store_url' => $aResult['cStoreURL'],
                        'rid' => $aResult['cRID'],
                        'affiliate_id' => $aResult['iAffiliateID'],
                        'team_id' => $aResult['iTeamID'],
                        'bizOP' => $aResult['cDefaultBizOpp'],
                        'showBizOPp' => $aResult['iShowBizOppDropdown'],
                        'boPosting' => $aResult['iEnableBOPosting'],
                        'brandinglevel' => $aResult['iBrandingLevel']
        );

       // dlog2("matt", __line__, $params);
        print_r($params);

$aResult is an array where the data is organized by column heading. However when I try to move the data to $params it returns an empty array. Any advice?

The idea is to going to set up a cron that will do an external post on $params

The $aResult has it been retrieved using PDO? If so using which method? Have you used fetch? Or fetchAll if your using the method above with $aResult['item] you should use fetch if not and you have used fetchAll you would need $aResult[0]['item'] otherwise an empty array will be produced . This is my guess from the information given