VirtueMart Forum

VirtueMart 2 + 3 => Virtuemart Development and bug reports => Topic started by: oxido on June 28, 2012, 11:45:33 am

Title: "SELECT stock FROM product_in_stock"
Post by: oxido on June 28, 2012, 11:45:33 am
how can I change the  "SELECT stock FROM product_in_stock" in virtuemart 2?
What i want to do is to import into VirtueMart stock from another database, not realy import...
I want VirtueMart to display stock from another database.

I am interested to find where is that "SELECT * FROM products" in connection with the stock, can someone help me please? :-[
Title: Re: "SELECT stock FROM product_in_stock"
Post by: oxido on June 28, 2012, 23:09:56 pm
nobody can give me any indication?    :(
Title: Re: "SELECT stock FROM product_in_stock"
Post by: vigier on June 29, 2012, 00:31:26 am
My knowledge of MySQL isn't that good, but my SQL Server knowledge is.
How I would do it in SQL Server: create a view that select from another database. Then change your select statement to use the view instead of the table.

The view would have a query like "SELECT stock FROM otherdatabasename.stocktable".
Your query would be like "SELECT stock FROM nameofyourview"