you will probably need to use the same code to strip slashes.
to help troubleshoot, change the following code:
$getTeams = mysql_query($query_getTeams, $spsptest) or die(mysql_error());
to:
$getTeams = mysql_query($query_getTeams, $spsptest) or die(mysql_error());
echo("SQL: ".$query_getTeams);
this will write the query to the screen to help us see what is going wrong.