Page 1 of 1

populate grids

Posted: Wed Aug 14, 2019 7:56 am
by Thommelise
$V_ORDERID = @%ORDERID;

@=linuxManualDiskLayoutID = executeQuery("SELECT D1 AS linuxDiskManualTag, D2 AS linuxManualDiskLgVg, D3 AS linuxManualDiskSize, D4 AS linuxManualDiskDescr FROM PMT_ORDER_DATA_ITEM WHERE ORDERITEMID='$V_ORDERID' AND TYPE= '4'");

trying to populate grids by using a trigger. i have 2 tables order_data and order data_item.

why dosent it work?

Re: populate grids

Posted: Wed Aug 14, 2019 8:51 pm
by amosbatto
MySQL is very particular about data types. If your ORDERITEMID and TYPE fields are integers, then you need to remove the single quotation marks from your database query like this:
Code: Select all
@=linuxManualDiskLayoutID = executeQuery("SELECT D1 AS linuxDiskManualTag, D2 AS linuxManualDiskLgVg, 
   D3 AS linuxManualDiskSize, D4 AS linuxManualDiskDescr 
   FROM PMT_ORDER_DATA_ITEM 
   WHERE ORDERITEMID=$V_ORDERID AND TYPE= 4");
Also, verify that linuxManualDiskLayoutID is the exact spelling of the variable associated with your grid (if you are trying to populate a grid).