Why does this produce an object?
$sql = $this->db->query("
SELECT 'product_id'
FROM " . DB_PREFIX . "product_to_category
WHERE category_id = '" . $this->db->escape($category['category_id']) . "'
");
And how to I get a string/array instead?
From Opencart Related: Object of class stdClass could not be converted to string
OpenCart.dblayer. Also, there a lot of examples in other model files. PS: Don't forget to escape string data.