The mysql query to delete the row would be
DELETE FROM tablename WHERE team_url = '$team_url';
$team_url is the php variable which has the team_url value.
The above command will delete all rows where the team_url matches $team_url.
What you will want to do is in php loop through all the rows and check their URL.
$query = "SELECT * FROM tablename";
// Perform Query
$result = mysql_query($query);
// Check result
// This shows the actual query sent to MySQL, and the error. Useful for debugging.
if (!$result) {
$message = 'Invalid query: ' . mysql_error() . "\n";
$message .= 'Whole query: ' . $query;
die($message);
}
// Use result
// Attempting to print $result won't allow access to information in the resource
// One of the mysql result functions must be used
// See also mysql_result(), mysql_fetch_array(), mysql_fetch_row(), etc.
while ($row = mysql_fetch_assoc($result)) {
if (Security::checkUrl($row['team_url'])) {
$res = mysql_query("DELETE FROM tablename WHERE team_url = '".mysql_real_escape_string($row['team_url'])."'");
}
else {
//update xml
}
}
mysql_free_result($result);
The above code is just a sample and not to be used in production without proper sql injection cleaning / checking.