Can someone give me an example? I have an update query that uses two manual inputs from a PHP page. I put in the recordid and the multiplier and it changes pricing for all the products by the second amount. Ths issue is that I have 13 records (and it could grow) and it is getting tiresome to manually put in the info. Here's my query:
$query="INSERT INTO
vtiger_pricebookproductrel
( pricebookid
, productid
, listprice )
select (".$fieldvalue1.")
, productid
, (unit_price *.769) * (".$fieldvalue2.")
from vtiger_products";
$fieldvalue1 and $fieldvalue2 would be the variables that I need to use from a different table. The table only has two fields, recordid and markup.
Ideally I would like to setup a PHP page to do this with a button and some sort of status , but that is icing on the cake, for now getting the query to work would be great. Any advice is appreciated
$query="INSERT INTO
vtiger_pricebookproductrel
( pricebookid
, productid
, listprice )
select (".$fieldvalue1.")
, productid
, (unit_price *.769) * (".$fieldvalue2.")
from vtiger_products";
$fieldvalue1 and $fieldvalue2 would be the variables that I need to use from a different table. The table only has two fields, recordid and markup.
Ideally I would like to setup a PHP page to do this with a button and some sort of status , but that is icing on the cake, for now getting the query to work would be great. Any advice is appreciated