I'm fixing up a module and I have the following db_select() code, but I'm getting the following error:
Fatal error: Call to a member function execute() on a non-object in /var/www/xxx/sites/all/modules/xxx/xxx.module on line 414
I think it has something to do with the addExpression line, but I'm unsure of what this line does or what is the equivalent of addExpression in sql? What is MAX(poss), poss -- mean?
$query_poss = db_select('saved_lists', 'saved_lists') ->condition('saved_lists.lid', $lid) ->addExpression('MAX(poss)', 'poss') ->execute() ->fetchField();