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

Get cur.execute(select).fetchone() cannot get element value by specify column name #74

Open
Taitanguo opened this issue Apr 16, 2018 · 0 comments

Comments

@Taitanguo
Copy link

cur.execute("SELECT BranchName FROM RunManager2.dbo.Branch WHERE BranchName = ? AND Official = ?", ["near", 1])
branch_id = cur.fetchone()
print(branch_id.get('BranchName')) //this is not working but print(branch_id[0]) is working

I'm running on a python 3.4 environment

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

1 participant