I appreciate everything you've done and realize sometimes there are limitations.

Quote Originally Posted by gjh42 View Post
The construction of the SQL query, aside from range limitations, has not changed since its original version. Did you have or notice this issue before?

It may be differences caused by database upgrades.

CSV generated from within ZC v1.3.9h was always in the same order as invoices
Previous version also included customer and order info on a line by line basis. Now it seems to be only associated with the first line of an order.

Quote Originally Posted by gjh42 View Post
I don't know how mySQL decides to order its results in the absence of specific "order by" commands... that needs someone with expert knowledge. Is there actually a definite order, or does it depend on some random access effects from efficient searching techniques? It might be possible to add an "order by products_id" clause in the right sequence so the overall results keep orders together. I would have to research the sequence of operation of multiple items in the "order by".
I'll have to do a bit more detailed looks but from what I can tell, the csv now appears to be in alpha-numerical order by product name.

I made a lame attempt at using the orders_products_id which I believe to be associated with specific attribute order that matches the invoice order.

Quote Originally Posted by gjh42 View Post
Are you wanting the CSV product output to match the invoice order? Does the invoice order match the db stored order, and does that match the order in which the customer actually added the products to the cart?
Yes, the CSV output matched invoice order before now. The invoice order matches the db as best I have been able to tell.