Subversion Repositories VORC

Rev

Rev 180 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 180 Rev 208
Line 24... Line 24...
24
	# Get the class location
24
	# Get the class location
25
	my ($location) = $dbh->selectrow_array ("select location from class where date = ? and start_time = ? and name = ?", undef, $date, $start_time, $name);
25
	my ($location) = $dbh->selectrow_array ("select location from class where date = ? and start_time = ? and name = ?", undef, $date, $start_time, $name);
26
	warn "ERROR: No Location Found for [$date, $start_time, $name]" and next unless $location;
26
	warn "ERROR: No Location Found for [$date, $start_time, $name]" and next unless $location;
Line 27... Line 27...
27
	
27
	
28
	# Get the class id and role id
28
	# Get the class id and role id
29
	my ($class_id, $role) = $dbh->selectrow_array ("select id, concat('CLA-', max(cast(substring_index(role, '-', -1) as UNSIGNED)) +1) as role, count(role) from v_class_signup where date = ? and start_time = ? and location = ?", undef, $date, $start_time, $location);
29
	my ($class_id, $role) = $dbh->selectrow_array ("select id, concat('CLA-', max(cast(substring_index(role, '-', -1) as UNSIGNED)) +1) as role, count(role) from v_class_signup_new where date = ? and start_time = ? and location = ?", undef, $date, $start_time, $location);
Line 30... Line 30...
30
	warn "ERROR: Unable to calculuate RoleID for [$date, $start_time, $location]" and next unless ($class_id and $role);
30
	warn "ERROR: Unable to calculuate RoleID for [$date, $start_time, $location]" and next unless ($class_id and $role);
Line 31... Line 31...
31
	
31