I have a problem that I can not solve at all. I'm trying to list only clients that have never made purchases, ie checking in the order table if there is no purchase associated with the client id, I'm using the query:
SELECT * FROM '" . DB_PREFIX . "customer' AS c INNER JOIN '" .
DB_PREFIX . "order' AS o ON (c.customer_id = o.customer_id) INNER JOIN
'" . DB_PREFIX . "address' AS a ON (c.address_id = a.address_id) WHERE
o.customer_id is null"
So here's my model: link
The controller: link
And the view: link
When I remove the where to only test the listing, these errors appear: link
But do not return the values, I believe that I used the where in the wrong way in this query. How can I resolve?