Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transactions - Statement provided can not be prepared. #4

Open
Halama opened this issue Nov 8, 2019 · 1 comment
Open

Transactions - Statement provided can not be prepared. #4

Halama opened this issue Nov 8, 2019 · 1 comment

Comments

@Halama
Copy link
Member

Halama commented Nov 8, 2019

Všiml jsem si že pro start a commit transakce to generuje vždy jednu chybnou query. V PHP to ale exception nevyhodí a vše proběhne zdá se ok. U starého https://github.com/keboola/php-db-import#development jsem ověřil že se to objevuje taky.

image

image

@zajca
Copy link
Member

zajca commented Nov 22, 2019

Jo to bude asi tím že používáme špatně BEGIN TRANSACTION a COMMIT
asi by se měly použít odbc metody:
odbc_autocommit($conn, FALSE);
odbc_commit($conn);
odbc_rollback($conn);
https://www.php.net/manual/en/function.odbc-autocommit.php

Sledoval sem query co tam běží a oboje se volá jen jednou takže bude něco špatně v tom jak se to volá přes odbc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants