Active
Project:
Beanstream
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Feb 2012 at 00:43 UTC
Updated:
15 Feb 2012 at 00:43 UTC
In uc_beanstream.module, in uc_beanstream_get_country_code(), in the SQL, all three instances of the table name should have brace-brackets around them, not just the one in the FROM clause:
$country_code = db_result(db_query("SELECT uc_countries.country_iso_code_2 FROM {uc_countries} WHERE uc_countries.country_id = %d", $country_id));
...should be:
$country_code = db_result(db_query("SELECT {uc_countries}.country_iso_code_2 FROM {uc_countries} WHERE {uc_countries}.country_id = %d", $country_id));
I had errors because of this, as my drupal install uses tablename prefixing.