Active
Project:
Pay
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Sep 2012 at 05:16 UTC
Updated:
19 Sep 2012 at 05:24 UTC
In pay_update_6004(), one of the db_update() calls uses a non-existent query method join().
// Special case - successful transactions (e.g. from CIM) on $0 transactions.
$query = db_update('pay_transaction', 't')
->fields(array(
'state' => "pending",
));
$query->join('pay_activity', 'a', 't.pxid = a.pxid');
$query->condition('t.state', "canceled")
->condition('a.result', '1')
->execute();
UPDATE queries don't support JOINing to other tables. I'm guessing that this needs to be written as either a SELECT statement and then a loop to update the records, or using an WHERE clause with a subquery (UPDATE pay_transaction ... WHERE paid IN (SELECT paid FROM pay_activity ...)).
Comments
Comment #1
quicksketchHere's the relevant diff from the patch in #998736: Drupal 7 porting that added this change:
In all fairness, we could probably update our Drupal 6 installation of Pay module first and this wouldn't be a problem in D7. Though it'd be nice to get this upgrade path working directly.