problem:
- SQL in funktion regcode_load() fails with enables table prefixing. Error occurs at insertion time of voucher code on user profile.

- current implementation:

'SELECT term_data.tid, term_data.name
FROM {regcode_term}
JOIN {term_data} ON (regcode_term.tid = term_data.tid)
WHERE regcode_term.rid = %d'

- bugfix:
'SELECT term_data.tid, term_data.name
FROM {regcode_term} AS regcode_term
JOIN {term_data} AS term_data ON (regcode_term.tid = term_data.tid)
WHERE regcode_term.rid = %d'

Regards,
Thomas

Comments

aidanlis’s picture

Thanks for the fix!

aidanlis’s picture

Status: Active » Fixed
juankvillegas’s picture

Status: Fixed » Needs work

You added the alias {regcode_term} AS regcode_term

But you didn't add the alias {term_data} AS term_data on line 359

I can confirm that adding the bold text the warning doesn't appears again.

Congratulations for this very usefull module.

aidanlis’s picture

Status: Needs work » Fixed

Thanks, it's in the dev version now!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.