adller99 Posted November 5, 2015 Share Posted November 5, 2015 Hi, I need to use sql transaction for incrementing referender order number. The client wants to have the reference number incremented by 1. So I've decided to modify generateReference() method within Order class. $custom_last_order_id = Db::getInstance()->getValue('SELECT MAX(reference) AS order_reference FROM '._DB_PREFIX_.'orders '); return $custom_last_order_id+1; how do I secure this to be transactioned? thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now