check two things for me real quick....
1) use this instead
$sql = "DELETE FROM orders WHERE date_rec < '$before'";
2)
check how the date is stored on the database. are you sure it has dashes in it, or is it a solid number?
ok, I lied....check this also
3)
you are using months days and years. which the computer is reading as 022703 and you are judging it against a date like 120602. Now as a date, as humans we recognize it as the latter before the first. What you probably need to do is change both dates that are being compared into seconds with maketime and then see which is less.
make sense?