I really think the solution to this problem could be very simple
Datastore class:
[sql]
$dataitems = $db->query_read("
SELECT title, data
FROM " . TABLE_PREFIX . "datastore
# LEFT JOIN " . TABLE_PREFIX . "_NEWTABLE_ ON(datastore.title = _NEWTABLE_.title AND \"" . THIS_SCRIPT . "\" IN(_NEWTABLE_.page)
# LEFT JOIN " . TABLE_PREFIX . "product ON (product.productid = _NEWTABLE_.productid)
WHERE title IN ($itemlist)
# OR ( NOT NULL(_NEWTABLE_.title) AND product.active = true )
");
[/sql]
|