I have tried this, but no luck:
array('fn_export_purchased_amount', '#key'), 'linked' => false, 'export_only' => true );function fn_export_purchased_amount($product_id, $order_id)
{
return db_get_field(“SELECT amount FROM ?:order_details WHERE product_id = ?i AND order_id = ?i”, $product_id, $order_id);
}return $schema;