First rule in problaming, Do not re-invent the wheel. Unless you are doing the Wheel!
introducing ezORM for PHP.