I am updating a plugin that makes use of the guid field in wp_posts to get a full permalink (which worked before wp2.5).
Before wp2.5, the full permalink was stored in the guid field, but now there is only a post ID like: http://example.com/?=postnr in this field.
The question is: how can I convert (for wp2.5+ up to wp2.7) this http://example.com/?=postnr to the full permalink (like for example http://example.com/postname/ or http://example.com/year/postname/)? Or, alternatively, where can I find in the database the full permalink?
Also, how can I check the wp version inside the script?