In uc_affiliate2_user_delete(), please, change

db_update('uc_affiliate2')
  ->condition('aid', $account->uid)
  ->fields(array('aid'), $parent)
  ->execute();

to

db_update('uc_affiliate2_users')
  ->condition('aid', $account->uid)
  ->fields(array('aid' => $parent))
  ->execute();
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

djg_tram’s picture

Issue summary: View changes

Typography

marty.true’s picture

Didn't work for me.

christofa’s picture

Worked for me! Thanks.

HoangD’s picture

Issue summary: View changes

Worked for me

citricguy’s picture

Same issue here.

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0='aid'#012WHERE (aid = '4322')' at line 1: UPDATE {uc_affiliate2} SET 0=:db_update_placeholder_0#012WHERE (aid = :db_condition_placeholder_0) ; Array#012(#012 [:db_update_placeholder_0] => aid#012 [:db_condition_placeholder_0] => 4322#012)#012 in uc_affiliate2_user_delete() (line 331 of /home/www//sites/all/modules/uc_affiliate2/uc_affiliate2.module)

It seems that the function is trying update a table that does not exist (uc_affiliate2).

Both 7-1.3 and 7-dev seem to have this issue.

I can confirm that @djg_tram's solution works. I've attached a patch using his code.

retiredpro’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
FileSize
545 bytes

Thanks. djg_tram's solution worked for me too. Attached a patch that's relative to the module.