Hello
I am using edittype select, but my variable ($custId) in the SQL statement does not get resolved:
$col["edittype"] = "select";
$str = $details->get_dropdown_values(("SELECT a.ItemRef_ListID as k, a.ItemRef_FullName as v
FROM salesorderlinedetail a
JOIN (SELECT b.TxnID,b.CustomerRef_ListID
FROM salesorder b
WHERE CustomerRef_ListID = '$custID') Transactions
ON a.IDKey = Transactions.TxnID
JOIN iteminventory c
ON a.ItemRef_ListID = c.ListID
ORDER BY a.ItemRef_FullName ASC""));
$col["formatter"] = "select";
$col["editoptions"] = array("value" => $str);
It always shows as an empty string in the debugger:
SELECT a.ItemRef_ListID as k, a.ItemRef_FullName as v,a.IDKey
FROM salesorderlinedetail a
JOIN (SELECT b.TxnID,b.CustomerRef_ListID
FROM salesorder b
WHERE CustomerRef_ListID = '') Transactions
ON a.IDKey = Transactions.TxnID
JOIN iteminventory c
ON a.ItemRef_ListID = c.ListID
ORDER BY a.ItemRef_FullName ASC
I know the variable is not nul; I've checked it just beforehand. I have no problem using variables in my select_command statements. The statement works if I plug in an actual value.
Thanks!
Pat