Ran across the following code in the sales report plugin:
Code:
$order_info = $db->Execute(
"SELECT o.currency, o.currency_value, o.order_total
FROM " . TABLE_ORDERS . " o
WHERE o.orders_id = $oID
LIMIT 1"
);
Note that the php variable $oID is enclosed in the long double-quoted phrase. I always thought a query like this should be written as:
Code:
$order_info = $db->Execute(
"SELECT o.currency, o.currency_value, o.order_total
FROM " . TABLE_ORDERS . " o
WHERE o.orders_id = " . $oID .
" LIMIT 1"
);
.
Does the Execute method really substitute the value of $oID for the text "$oID"?
Sorry, I can't follow the code in Execute to answer the above question.
Bookmarks