thanks guys
after a lot of testing I finally decided to re-design the db anyway.
Instead of having one column: Drafted I know have four Dyear, Dround, Doverall, Dteam ... and now it is much easier to sort.
Still... I have just a minor problem. Kind of weird I guess.
In order not to manually move info from the drafted column to the other four I have this script below
for($index = 0; $index< $rows; $index++) {
$PlayerID = mysql_result($result, $index, "PlayerID");
$Drafted = mysql_result($result, $index, "Drafted");
preg_match("|([0-9]+)/([0-9]+)\s*\(([0-9]++).*\).*(\w+)$|Ui", $Drafted, $matches);
$round = $matches[1];
$year = $matches[2];
$overall = $matches[3];
$team = $matches[4];
$idraft = "UPDATE player SET Dyear = '$year', Dround = '$round', Doverall = '$overall', Dteam = '$team'
WHERE Drafted LIKE '%/%' AND PlayerID='$PlayerID'";
$result2 = mysql_query($idraft,$db_link);
}
The preg_match("|([0-9]+)/([0-9]+)\s(([0-9]++).).*(\w+)$|Ui", $Drafted, $matches);
divides the following "1/2000 (20th overall) by Boston" to
1
2000
20th
Boston
The weird thing is that that preg_match worked while testing it on my windows ISS server, but not when I tried to run it on the main (apache) server.
It works however if I change the preg_match to:
preg_match("|([0-9]+)/([0-9]+)\s(([0-9]+[stndrdh]{2}).).*(\w+)$|Ui", $Drafted, $matches);
but this way I receive "20th" instead of "20" ... so now I'm asking you if you could possibly tell me what I should change in my preg_match in order to get only 20 and not using the same preg_match that I had above (which does not work on an apache-server, or a different php-version).