begin(); $stmt = $con->createStatement(); if (is_array($dataVariable)) { foreach ($dataVariable as $uid) { $rs = $stmt->executeQuery("INSERT INTO " . AppAssignSelfServiceValueGroupPeer::TABLE_NAME . " (" . AppAssignSelfServiceValueGroupPeer::ID . ", " . AppAssignSelfServiceValueGroupPeer::GRP_UID . ") VALUES (" . $appAssignSelfServiceValueId . ", '" . $uid . "');"); } } else { $rs = $stmt->executeQuery("INSERT INTO " . AppAssignSelfServiceValueGroupPeer::TABLE_NAME . " (" . AppAssignSelfServiceValueGroupPeer::ID . ", " . AppAssignSelfServiceValueGroupPeer::GRP_UID . ") VALUES (" . $appAssignSelfServiceValueId . ", '" . $dataVariable . "');"); } $con->commit(); // Commit all rows inserted in batch } catch (Exception $error) { throw new $error; } } } // AppAssignSelfServiceValueGroup