Thanks the problem seems to be if old VM users re-order.
This is a case where I have a duplicated user (708)
SELECT
jos_hikashop_order.order_user_id,
jos_hikashop_order.order_id,
jos_hikashop_address.address_lastname
FROM
jos_hikashop_order
INNER JOIN jos_hikashop_address ON jos_hikashop_address.address_id = jos_hikashop_order.order_shipping_address_id
WHERE jos_hikashop_order.order_user_id = 708
order_user_id order_id address_lastname
708 9333 Moorhouse
708 36066 Partners
708 36067 Moorhouse
So we have three orders all pointing to user_id 708 which is incorrrect
How does Hikashop deal with this 'cause it works ok
user_id column of the hikashop_user is ok there are not any duplicates
SELECT
jos_hikashop_user.user_id,
jos_hikashop_user.user_cms_id
FROM
jos_hikashop_user
WHERE user_id = 708
Correctly give one line/user