0 ) {
$variation_id = absint($variation_id);
$variation_name = $wpdb->get_var("SELECT `name` FROM `".WPSC_TABLE_PRODUCT_VARIATIONS."` WHERE `id`='$variation_id' LIMIT 1") ;
$main_variation_id = $wpdb->get_var("SELECT `id` FROM `".WPSC_TABLE_PRODUCT_VARIATIONS."` WHERE `id`='$variation_id' LIMIT 1") ;
$variation_values = $wpdb->get_results("SELECT * FROM `".WPSC_TABLE_VARIATION_VALUES."` WHERE `variation_id`='$variation_id' ORDER BY `id` ASC",ARRAY_A);
$variation_value_count = count($variation_values);
}
// if people add more than 90 variations, bad things may happen, like servers dying if more than one such variation group is put on a product. 90*90 = 8100 combinations
if(($_GET['valuecount'] > 0) && ($_GET['valuecount'] <= 90)) {
$value_form_count = absint($_GET['valuecount']);
} else {
$value_form_count = 2;
remove_query_arg( array('valuecount'), $_SERVER['REQUEST_URI'] );
}
if($variation_name != '') {
?>