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

Problem with column with strings #16

Open
BNils opened this issue Oct 19, 2016 · 1 comment
Open

Problem with column with strings #16

BNils opened this issue Oct 19, 2016 · 1 comment

Comments

@BNils
Copy link

BNils commented Oct 19, 2016

Hey,

i have connect to my MySQL DB and can't Select columns with Strings. Columns with Ints works.

the following case don't realize that the fieldType is String and returns null
case MysqlTypes.MYSQL_TYPE_VAR_STRING:

What works wrong?

@hhh19742013
Copy link

It is easy to fix this bug.
Go to Result.swift, in function readRow(), add 3 lines of code around line 80:
if let val = name {
switch cols[i].fieldType {

case MysqlTypes.MYSQL_TYPE_STRING:
row[cols[i].name] = name
break

						case MysqlTypes.MYSQL_TYPE_VAR_STRING:
                            row[cols[i].name] = name
                            break

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