Sign up | Forget your password?
English Français

Forum > Bugs

Delete Club Bug & Fix For It

 
Author Topic

Weblinx
Delete Club Bug & Fix For It
Mon Mar 16, 09 - 18:58

By adding my code to debug query problems, I found a bug with the club/sql_club.php file that caused problems when trying to delete a club.

The correct code for lines 23-25 should be:

 /* verification */
$sql['club']['verif_club']="(SELECT member_id FROM ".T_member_club." WHERE club_id='{id}')
UNION (SELECT match_id FROM ".T_match." WHERE club_visitor_id='{id}' OR club_home_id='{id}')
UNION (SELECT team_id FROM ".T_team." WHERE club_id='{id}')";

What the above code does is check to see if the club is associated with either a member, a match, or a team prior to deleting it. If it is, the application in club/club_list.php then provides a message stating that it cannot be deleted. Hope this helps someone.