Commit b12b695f authored by Mario's avatar Mario

fix query for postgres

parent 0d3df1a4
......@@ -1852,10 +1852,11 @@ function cart_after_fulfill_finishorder(&$hookdata) {
$iteminfo=$hookdata["item"];
$orderhash=$iteminfo["order_hash"];
$r=q("select distinct(cart_orderitems.id) from cart_orderitems
where cart_orderitems.item_fulfilled is NULL AND
cart_orderitems.order_hash = '%s'",
dbesc($orderhash));
$r=q("SELECT cart_orderitems.id FROM cart_orderitems WHERE
cart_orderitems.item_fulfilled = 0 AND
cart_orderitems.order_hash = '%s' LIMIT 1",
dbesc($orderhash)
);
if ($r) {
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment