0
I have a problem I can’t solve in any way. I am trying to list only customers who have never made purchases, ie by checking in the order table if there is no purchase associated with the customer id, I am 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 is my model: https://pastebin.com/ecA0HY4z
The controller: https://pastebin.com/YwEpULC3
And the view: https://pastebin.com/FGS4Dcj4
When I remove Where to test only the listing, these errors appear: https://pastebin.com/yWJ8zhTC
But it does not return the values, I believe I used Where wrong in this query. How can I solve?
Possible duplicate of Check if there is any purchase associated with the user
– NoobSaibot
You’ve asked this question twice, wait for someone to answer, put the code in the body of the question, I recommend you read it How to create a Minimum, Complete and Verifiable example, How to format my posts using Markdown or HTML? and What should I do if no one answers my question?
– NoobSaibot