Post by Sree » Thu Nov 09, 2017 5:35 pm

I wanted to start a transaction in opencart for a long db operation. Is there any default functions or any extension to do this easily something like below?

// First of all, let's begin a transaction
$db->beginTransaction();
// A set of queries;
$db->query('first query');
$db->query('second query');


//Checking Status
if($db->tarns_status=='true'){
$db->commit();
}else{
$db->rollback();
}

Newbie

Posts

Joined
Fri Oct 06, 2017 2:04 pm

Post by paulfeakins » Thu Nov 09, 2017 7:04 pm

I've never seen it, so you might be better off adding it.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by Sree » Thu Nov 09, 2017 7:29 pm

paulfeakins wrote:
Thu Nov 09, 2017 7:04 pm
I've never seen it, so you might be better off adding it.
I have found that MySql Engine for all OC tables is MyISAM. So DB transaction will not work. Is there any problem if I am changing Engine to InnoDB for all tables in OC?

Newbie

Posts

Joined
Fri Oct 06, 2017 2:04 pm
Who is online

Users browsing this forum: No registered users and 274 guests