stevesh is correct. You're using a v1.5.0 database with v1.3.9 PHP code.
You can't do that.

You'll need to restore your 1.3.9 database if you want to use v1.3.9 PHP code with it.