Closed (fixed)
Project:
Beanstream
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
22 Feb 2011 at 17:00 UTC
Updated:
4 Mar 2011 at 21:12 UTC
When running through a test submitting the checkout, I got the error:
* user warning: Table 'uc_countries' doesn't exist query: SELECT uc_countries.country_iso_code_2 FROM uc_countries WHERE uc_countries.country_id = 124 in /home/dickens/public_html/sites/all/modules/_custom/uc_beanstream/uc_beanstream.module on line 230.
By looking at the error, it tells me that the module does not take the table prefix into account when selecting tables from the database.
Comments
Comment #1
ryanilg commentedFigured I might as well include the fix. Line 230 in uc_beanstream basically just needs to be updated to
$country_code = db_result(db_query("SELECT country_iso_code_2 FROM {uc_countries} WHERE country_id = %d", $country_id));
Instead of looking for in specific tables for the SELECT and WHERE clauses, it now just looks for the column, and FROM has been updated to run though Drupals built in database selector, which adds the prefix.
Comment #2
andrechun commentedcommitted