Unknown column 'payment_id'
JaceRider - May 13, 2009 - 14:26
| Project: | Ubercart Marketplace |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | jbrodbeck |
| Status: | needs work |
Jump to:
Description
Hi, I am getting the below error when using mass pay:
user warning: Unknown column 'payment_id' in 'field list' query: UPDATE mp_seller_order_statuses SET payment_id = 1, seller_paid_status = 1 WHERE uid = 3 AND order_id = 44 in /home/mysite/public_html/sites/all/modules/ubercart_marketplace/mp_reports/mp_reports.admin.inc on line 870.
Looking at the install file for the reports module, I don't see anything about a payment_id field. Thanks for any help you can offer.

#1
This is an old issue but I'd like to ask if you ran update.php or tried doing a clean install of the latest version?
I'm unable to reproduce this error and will be needing more info to properly troubleshoot this one. If anybody is running into this, please feel free to chime in.
#2
Hey bud,
Ya, that was back in the day. No worries... all things resolved.
#3
Hello guys,
I installed the new version of ubercart marketplace, the one released on 7th october, dev version. I also, ran the update.php file but no luck. Could you please help me out form the issue??
RAVISH DAVE
http://www.openxcell.com
OpenXCell Technolabs
#4
ravs,
This field is directly related to masspay, which I'm currently trying to fix.
#5
Hello,
What we did is that we created a foreign key in that table but things are still not working fine. I am glad to know that you are working on that. When should I expect you to complete the fix, as a project of mine depends on this issue. Your help is appreciated.
RAVISH DAVE
#6
Hello jbrodbeck,
Can I talk with you on skype? What is your skype id?
Ravish Dave
#7
Hello,
As I mentioned earlier, I had added a foreign key 'payment_id' in the table order status table. But I see that the payment id that is added to the new colum as per the inbuild SQL query is always 1, despite of the user or order. I checked further in the code and I could see that it cam from $seller['payment_id']. Now, the value of $seller['payment_id'] is assigned from db_latest_insert_id api which further uses the CURRVAL mysql function. When I tried to further implement the sql query with this CURRVAL function, it stated that no such FUNCTION exists in the database. Could any one guide me that what is happening here.
Ravish Dave
#8
Hello,
I checked further in the Drupal APi of db_last_insert_id() and in that the MySql function LAST_INSERT_ID() is being used (and not CURRVAL as mentioned on http://api.drupal.org/api/function/db_last_insert_id/6) which is always returning 0 and hence the value of $seller['payment_id'] is always showing to be 1 ( 0 + 1 ). Therefore, even after adding 'payment_id' as the foreign key in the order status table, on each insert, it's value is being inserted as 1 only.
#9
ravs,
You can contact me through the contact form on this site. If you're interested in helping out with code on the module, you can certainly post patches here and we can review them. I'm unfortunately buried in other projects this week and the renovation required on masspay- reporting, permissions, and installation is fairly large. In fact, having examined the current 6.x release, I don't believe mass pay is even functional (which, all things aside is what should be writing field_id into mp_seller_order_statuses). Also, I've run into some disconcerting bugs in the date area of the reporting which may also need to be fixed in conjunction with payment reporting.
My rough estimate of all that getting fixed is probably no sooner than a week or two if you count the reporting bugs. If you are interested in additional features or a speedier resolution to this problem, maybe we can discuss sponsorship.
#10
Hello jbrodbeck,
I would be glad to be a part of the solution. However, I am too busy with other stuff. But still I can try my best to get the solution. Can you tell me when you shall be working on the bug issue? This is because a project of our is stranded due to ubercart marketplace. It is a great module but I need to wait till the whole module becomes flawless. Lookign forward to hear from you soon.
Ravish Dave
#11
subscribing to this issue.