function _webform_analysis_product in Ubercart Webform Integration 6
Same name and namespace in other branches
- 7.3 components/product.inc \_webform_analysis_product()
- 7.2 components/product.inc \_webform_analysis_product()
Implementation of _webform_analysis_component().
File
- components/
product.inc, line 249 - Webform module product component.
Code
function _webform_analysis_product($component, $sids = array()) {
$results = db_query("SELECT data, no FROM {webform_submitted_data} WHERE nid = %d AND cid = %d ", $component['nid'], $component['cid']);
$total = 0;
while ($result = db_fetch_array($results)) {
if ($result['no'] == 2) {
$total += $result['data'];
}
}
$product_info = explode('_', $component['extra']['product'], 2);
$product_node = node_load($product_info[0]);
$rows[0] = array(
t($product_info[1]),
$total,
);
return $rows;
}