I've migrated from mysql to postgresql and while trying to read a verse I got this error.

PDOException: SQLSTATE[42883]: Undefined function: 7 ERROR: function field(bigint, integer) does not exist LINE 1: ...N' AND chapter = 14 ORDER BY verse, linemark DESC,FIELD(bid,... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.: SELECT * FROM {bible_context} WHERE bid IN (1) AND book = 'GEN' AND chapter = 14 ORDER BY verse, linemark DESC,FIELD(bid, 1); Array ( ) em bible_all() (linha 1673 de /mydomain.com/sites/all/modules/bible/bible.module).

Comments

berenddeboer’s picture

Issue summary: View changes

postgresql does not have the field() function apparently.

dieuwe’s picture

Status: Active » Needs work

I am looking into this, but most of the queries in this module have been written specifically for MySQL. I am attempting to convert the query causing this error into a db_select, but there are some problems in getting that done right.

dieuwe’s picture

Status: Needs work » Closed (outdated)