Don't you just love mysql's lack of cascading deletes? 🙂
In a real database you would define the sportid relation between the two tables as 'ON DELETE CASCADE'. Then if you delete an item fro the first table, all related items are also removed from the second table automatically.
In the latest versions of mysql you can at least define some sort of Primary-key / Foreign-key relation which will prevent you from removing records from the first table that are still being referenced from the second table.
As for the solution, remember that you must check whether every delete from the second table was executed succesfully before you actually delete the record from the first table.
MySQL does not do any integrety checks, you must do them all in your application.