In "uc_product_power_tools.install" and "uc_product_power_tools.admin.inc" the db_query(...) method is being used with a "REPLACE" SQL statement.
This fails on databases that do not have a "REPLACE" SQL statement.

Simply using the db_merge(...) method fixes this problem.

I've attached the changes I made with the SQL statements of "UPDATE" and "REPLACE" being used, and are now using the db_update(...) and db_merge(...) statements instead.
I'd suggest using the db_select(...) method with all "SELECT" statements as well, however.

Thanks!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TR’s picture

Category: bug » task
Priority: Major » Normal
Status: Active » Needs work

The port to D7 hasn't been finished yet. Thank you for identifying one of the things that still needs to be done.

The SELECT statements should not be changed; static queries in Drupal are supposed to use SELECT instead of db_select().

Please DO NOT attach complete files to an issue. They're pretty useless as they are unknown versions that have been modified in unknown ways. It makes maintenance and support of the module harder if there are unknown modifications floating around, and it makes it impossible for the community to evaluate the fixes. I'm not about to comb through that file line-by-line to try to figure out what changes you've made. Changes/fixes should be provided in the form of a patch. See http://drupal.org/patch for details.

sher1’s picture

Here is your patch file. I grabbed the new and your old and did the diff and created the patch.