After installing E-commerce-CVS on Drupal 4.7.0-beta6 I get this error. I installed the Drupal-CVS and got the same error when I go to add a product...

Unknown column 'p.vid' in 'on clause' query: SELECT n.nid FROM node n INNER JOIN ec_product p ON n.vid = p.vid WHERE n.status = 1 ORDER BY n.sticky DESC, n.created DESC LIMIT 0, 15 in /home/sdga/public_html/includes/database.mysql.inc on line 120.

Thanks,
Tom

Comments

WithoutaDoubt’s picture

Component: other » product.module

I found this line in product.module

$result = pager_query(db_rewrite_sql('SELECT n.nid FROM {node} n INNER JOIN {ec_product} p ON n.vid = p.vid WHERE n.status = 1 ORDER BY n.sticky DESC, n.created DESC'), $rows * $columns, 0);

I think that there may be a problem with it... But I can't tell!

I am running PHP 4.4.1 and MySQL 4.1.18-standard
Thanks,
Tom

gordon’s picture

If you are upgrading your installation you will need to run update.php to add the additional fields.

WithoutaDoubt’s picture

It was a new installation... No upgrade. I meant I did a fresh install of both beta6 and CVS to see if it has been fixed already, or if I had maybe done something wrong. What does it mean to have an "unknown column 'p.vid'"? Is p.vid a variable? A database table?
Thanks,
Tom

gordon’s picture

Start again, do not load ecommerce.mysql, and you will not have the problems.

WithoutaDoubt’s picture

Thank you,
Tom

inteja’s picture

I had the same problem.

Tried dropping unchecking ecommerce modules, dropped ec tables, re-checked ec modules but onle the ec_product_file table was created automatically.

Does unchecking a module still leave some residual information behind?

WithoutaDoubt’s picture

I did a re-install because it is a fresh installation anyways...And it worked perfect. I am not sure how to fix it. I would try unchecking the modules, removing the ecommerce directory and re-uploading it, deleting all ec_ tables, and then uploading the ecommerce directory.... Not sure if it will work.
Good luck,
Tom

gordon’s picture

Status: Active » Fixed

fixed

Anonymous’s picture

Status: Fixed » Closed (fixed)