PDA

View Full Version : Proper Database Access in Merchant Scripts


talamar
01-18-07, 07:40 PM
If I write a merchant component that needs to access data in the merchant data backend (notice I said backend and not db, I want this to be source agnostic, xbase, MySQL, MIVAdb files), what is the proper way to access this information? Do I need to write 3 different subroutines? Is there a proper db api in the code? I was looking through the docs on DB functions and there seems to be a lack of basics that I would think would be there, like:
Return all orders by a customer

Also, I can't find any sorting mechanisms in the code. If the DB is agnostic, there should be a sort attribute passed to the function.