Hi
Our site is hosted by rackspace and we reported that we were getting an error . . .
They suggested we let them run "MySQL's slow query log" to identify the problem.****** Sorry!
There seems to be a problem connecting to our database. Please give us a few
minutes to remedy the problem. Thank you. ******
This they did and came back withe following query . . .
It seems that this query was generated when we attempted to send a newsletter from Zencart.select count(*) as total from orders o left join orders_total ot on (o.orders_id = ot.orders_id), orders_status s where o.orders_status = s.orders_status_id
and s.language_id = '1' and ot.class = 'ot_total' and (o.customers_city like '%[email protected]%' or o.customers_postcode like '%[email protected]%' or o.date_purchased like '%[email protected]%' or o.billing_name like '%[email protected]%' or o.billing_company like '%[email protected]%' or o.billing_street_address like '%[email protected]%' or o.delivery_city like '%[email protected]%' or o.delivery_postcode like '%[email protected]%' or o.delivery_name like '%[email protected]%' or o.delivery_company like '%[email protected]%' or o.delivery_street_address like '%[email protected]%' or o.billing_city like '%[email protected]%' or o.billing_postcode like '%[email protected]%' or o.customers_email_address like '%[email protected]%' or o.customers_name like '%[email protected]%' or o.customers_company like '%[email protected]%' or o.customers_street_address like '%[email protected]%' or o.customers_telephone like '%[email protected]%' or o.ip_address like '%[email protected]%');
where [email protected] is the email address of one of our customers.
And it seems to do such a query for every recipient of the newsletter.
Anybody got any clues as to why the query seems to check all order fields for an email address.
And is there a more efficient piece of code that we might be able to use ?
thanks
4ec
Bookmarks