I am not sure why this is, perhaps some join I am doing wrong. I am getting
back 2 results, or records, identical to each other, where I only want one
record.
SELECT o.id, o.s_first_name, o.s_last_name, u.email
FROM orders AS o
INNER JOIN users AS u
ON (o.user_id = u.id)
INNER JOIN order_items AS i
ON (i.order_id = o.id)
INNER JOIN products AS p
ON (i.product_id = p.id)
WHERE o.status IN ('pre-order', 'delayed')
AND (o.delayed_ship_date <= DATE_ADD(NOW(), INTERVAL 1 DAY)
OR o.delayed_ship_date = '0000-00-00')
AND o.authnet_failures < 5
AND o.id NOT IN (0)
AND o.authnet_status IN ('empty', 'failed')
2 rows in set (0.02 sec)
--
-------------------------------------------------------------
Scott Haneda Tel: 415.898.2602
<http://www.newgeo.com> Fax: 313.557.5052
<[EMAIL PROTECTED]> Novato, CA U.S.A.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]