Jump to:
| Project: | Ubercart Userpoints |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hello
I got the following error when trying to add 10 userpoints to a product as a feature :
* warning: pg_query() [function.pg-query]: Query failed: ERROR: operator does not exist: character varying = integer LINE 1: ...lect pfid from uc_product_features where nid = 4 and fid = 0 ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. in database.pgsql.inc on line 139.
* user warning: query: select pfid from uc_product_features where nid = 4 and fid = 0 in uc_userpoints_product.module on line 120.
I've changed line 120 from :
$pf = db_fetch_object(db_query("select pfid from {uc_product_features} where nid = %d and fid = %d",$data['nid'],$data['fid']));
to :
$pf = db_fetch_object(db_query("select pfid from {uc_product_features} where nid = %d and fid = '%s'",$data['nid'],$data['fid']));
And that works. Just to let you know.
Comments
#1
Good catch, per the api docs this is a bug...
http://api.ubercart.org/api/function/uc_product_feature_save
Should show up in the dev release by tomorrow with several other fixes. The commit is here http://drupal.org/cvs?commit=487208. Marking as fixed.
#2
Actually need to update to fixed...
#3
Automatically closed -- issue fixed for 2 weeks with no activity.