Author Topic: "SELECT stock FROM product_in_stock"  (Read 2173 times)

oxido

  • Beginner
  • *
  • Posts: 4
"SELECT stock FROM product_in_stock"
« 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? :-[

oxido

  • Beginner
  • *
  • Posts: 4
Re: "SELECT stock FROM product_in_stock"
« Reply #1 on: June 28, 2012, 23:09:56 pm »
nobody can give me any indication?    :(

vigier

  • Jr. Member
  • **
  • Posts: 124
Re: "SELECT stock FROM product_in_stock"
« Reply #2 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"